Skip to content
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

Firefox 21 bug causes the original range element to remain visible #48

Open
acdha opened this issue May 17, 2013 · 2 comments
Open

Firefox 21 bug causes the original range element to remain visible #48

acdha opened this issue May 17, 2013 · 2 comments

Comments

@acdha
Copy link
Contributor

acdha commented May 17, 2013

See https://bugzilla.mozilla.org/show_bug.cgi?id=872351: FF21 shipped with some partial code for the native implementation which will ship in FF22/23, which has the key problem of setting display: inline-block !important; on all <input type="range"> elements, which cannot be overridden by normal CSS rules.

If they don't decide to ship a point release with a fix, we're stuck needing to do something ugly like a version sniff and wrapping the original input control in a display:none span. This works - see http://jsfiddle.net/acdha/pvNV3/2/embedded/result/ - but it's definitely ugly.

@acdha
Copy link
Contributor Author

acdha commented May 18, 2013

One other option would be updating the polyfill to change the type of the original input to either number or text when the slider initializes:

http://jsfiddle.net/acdha/pvNV3/4/embedded/result/

freqdec added a commit that referenced this issue May 21, 2013
* Fixed FF21 specific bug (issue #48)
* Fixed issue #45
* Fixed issue #43
* Updated minified version using the MS minifier
@freqdec
Copy link
Owner

freqdec commented May 21, 2013

Hi, I've added code that sets the "fd-slider-hidden" class and then checks the input element's computedStyle to see if the value for "display" is still "inline-block". If so, the input's type gets mutated to "number".

Many thanks for the detective work that enabled me to do this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants