#10554 closed bug (worksforme)
Problem with $("input[type=range]") in IE8
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | selector | Version: | 1.6.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It appears that the selecting for input[type=range] is buggy in IE8 for dynamically added elements to the DOM.
Below is an demonstration of the problem.
In FF, Chome, and IE9 the lengths are reported back as expected (1 and 2). In IE8, the length is 1 both times.
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>jQUery Bug Test</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script> $(document).ready(function () { $("body").append('<p>' + $("input[type=range]").length + '</p>'); $("body").append('<input type="range" />'); $("body").append('<p>' + $("input[type=range]").length + '</p>'); }); </script> </head> <body> <input type="range" /> </body> </html>
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
I just tested this in IE8 and it worked: http://jsfiddle.net/LVSaU/ Can you verify?
IE8 doesn't support type="range"
and will treat it as text. The attribute is "range"
but the property is "text"
. So support for HTML5 in IE 6/7/8 is non-functional in any case.
comment:3 Changed 11 years ago by
Component: | unfiled → selector |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | pending → closed |
Confirmed that http://jsfiddle.net/LVSaU/ works in IE8 as expected. We'll re-open if anyone is still experiencing issues with this in IE8/IE8+.
comment:4 Changed 11 years ago by
Created account in trac, so ticket reporter/ownership can be reassigned if desired.
I did more testing with this.
http://jsfiddle.net/LVSaU/ works, but http://jsfiddle.net/LLuth/ (explicitly using 1.6.4) fails for me on multiple IE8 machines.
I can reproduce the problem using the code from http://code.jquery.com/jquery-1.7b2.js, but I get correct behavior using http://code.jquery.com/jquery-git.js (reporting as "1.7pre Live From Git (f3a4d261ecd0e858515f6e3fa8f5ff59078ec895)") which is the same version that http://jsfiddle.net/LVSaU/ reports, so I think it is safe to assume that this will not be an issue once 1.7 goes live.
Sorry for not using jsFiddle. It was acting up when I was coming up with the test case.