Interestingly, one piece of this module's features is part of the HTML5 standard:
http://diveintohtml5.org/detect.html#input-placeholder
Some browsers seem to support the "placeholder" attribute already, so we can add dynamic support for it in our JS. (We still need to hide the label though.)
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | compact_forms-placeholder-669878-8.patch | 4.27 KB | jelle_s |
| #4 | compact_forms_html5_placeholders.patch | 2.24 KB | mstrelan |
Comments
Comment #1
sunA bit more details in the forms section:
http://diveintohtml5.org/forms.html#placeholder
Comment #2
mstrelan commentedSubscribe. Can this also please be added to the 6.x branch?
Comment #3
mstrelan commentedThis is the code for 6.x
Comment #4
mstrelan commentedPatch against HEAD attached
Comment #5
sunThis should use jQuery.support, and we should check whether there's also a common jQuery.support namespace for html5 features, so in case some other script already checked support, we simply re-use that value instead of detecting it again.
Which features of the non-html5 variant do we actually want to keep?
My first guess was that we'd create an entirely separate if condition upfront here and handle html5 differently...? Thoughts?
Powered by Dreditor.
Comment #6
mstrelan commentedAccording to http://api.jquery.com/jQuery.support/
I haven't found any examples of people using jQuery.support for this, only Modernizr. The convention for jQuery.support seems to be to just use camelCase for the feature you're detecting.
Comment #7
mgiffordHow would this work with http://drupal.org/project/html5_tools - seems like there's room for collaboration from the http://groups.drupal.org/html5 community.
Comment #8
jelle_sRerolled patch
Comment #9
Christophe Bourgois commentedThis patch (#8) is working for me also for version: 7.x-1.0.
Please apply this patch