-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input type="color" false negative in Opera 11 #159
Comments
thx for reporting this here, lucideer. fearphage also reported this it seems:
|
Fix: If you force a reflow in between setting the input value and checking the input value, Opera reports correctly. So...
... makes it work. |
Wow. nice hack. :) thx man! |
http://miketaylr.com/code/html5-forms-ui-support.html ^ this page was reporting correctly in Opera, so I had a look at figuring out why. Turns out jQuery inadvertently forces a document reflow while it's testing to see if W3C box model is supported, when it loads up - hence the test works there. |
Demo fiddle: http://jsfiddle.net/paul/SunVF/5/ (it Opera 11 supports The main problem is the Opera is very slow to enforce input value constraint validation onto the element. Currently Opera 11 changes it to #000000 but only at the window load event. That is too late for our purposes. To match the results of the other input values, the value validation would be applied even when the element is not yet added to the DOM. and miketaylr sez..
|
The main problem is the Opera is very slow to enforce input value constraint validation onto the element. Currently Opera 11 changes it to #0 but only at the window load event. That is too late for our purposes. I don't think that's the case. It's nothing to do with timing or the window load event. What you're seeing happening there is, Mootools (I guess - or some script loaded on that jsfiddle page) is triggering a document reflow at the window load event, which causes Opera to correct the value. You can trigger a document reflow as early as you like though - as I mentioned above. |
Yeah agreed. When I refound this bug, i had forgotten you already provided the fix. thx lucideer |
inputtypes fixup. Address Opera 11 type=color bug. Visually hide the type=range I hope to remove the extra Opera handling when 11.10 comes out. Closed by be9c058 |
…type=range Cache the inputElemType for speed. I hope to remove the extra Opera handling when 11.10 comes out. Fixes Modernizr#159 Fixes Modernizr#160
This seems to have been since remedied, perhaps it's time to remove this workaround? |
…type=range Cache the inputElemType for speed. I hope to remove the extra Opera handling when 11.10 comes out. Fixes Modernizr#159 Fixes Modernizr#160
There's a bug (#CORE-35065) in Opera 11's input type="color" support that makes the smiley test fail.
The smiley test was introduced due to a bug in Chrome I believe (according to this comment anyway); and the original input test used in Modernizr 1.0 works fine in Opera 11. Not sure its possible to work around both Opera and Chrome's feature-detection bugs simultaneously though :(
See @miketaylr's original Modernizr 1.0 based page for reference: http://miketaylr.com/code/input-type-attr.html
The text was updated successfully, but these errors were encountered: