Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10554 closed bug (worksforme)

Problem with $("input[type=range]") in IE8

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: None
Component: selector Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:


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>


	<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>
		$(document).ready(function () {
			$("body").append('<p>' + $("input[type=range]").length + '</p>');
			$("body").append('<input type="range" />');
			$("body").append('<p>' + $("input[type=range]").length + '</p>');

	<input type="range" />


Change History (4)

comment:1 Changed 11 years ago by anonymous

Sorry for not using jsFiddle. It was acting up when I was coming up with the test case.

comment:2 Changed 11 years ago by dmethvin

Owner: set to [email protected]
Status: newpending

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 addyosmani

Component: unfiledselector
Priority: undecidedlow
Resolution: worksforme
Status: pendingclosed

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 mpdonadio

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.

Version 0, edited 11 years ago by mpdonadio (next)
Note: See TracTickets for help on using tickets.