Last modified: 2014-02-12 23:38:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33110, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31110 - HTML5 placeholder attribute support
HTML5 placeholder attribute support
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-23 06:47 UTC by LY Meng
Modified: 2014-02-12 23:38 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Support for HTML5 placeholder attribute (51.66 KB, patch)
2011-09-23 06:47 UTC, LY Meng
Details

Description LY Meng 2011-09-23 06:47:29 UTC
Created attachment 9091 [details]
Support for HTML5 placeholder attribute

This enhancement allows Semantic Forms to support the HTML5 "placeholder" attribute on text inputs, text areas, and comboboxes.

http://dev.w3.org/html5/spec/Overview.html#the-placeholder-attribute

http://diveintohtml5.org/forms.html

Usage example:

{{{field|monthly unique visitors|placeholder=Ex: this is an example}}}

Notes:

-The combobox requires a modification in the .js script, and for some reason, the placeholder attribute on this input seems to only work if it's the last attribute defined in the input tag.

-The compatible browsers auto-style the placeholder for Semantic Forms'text inputs and text areas, but don't apply any style for the comboboxes. It has to be defined in the CSS. In the current patch I just applied a style for any placeholders, but there is in the comments the specific style for the comboboxes too.

-Wiki syntax doesn't work inside the placeholders (but doesn't cause a crash either)
Comment 1 Yaron Koren 2011-09-25 07:55:19 UTC
Thanks for this patch! I had no idea about the new "placeholder" attribute - it's awesome. I really need to look more into this HTML5 thing. Anyway, I added in the simple parts - for the text and textarea inputs - but haven't yet added the combobox handling, which requires the Javascript changes.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links