Skip to main content

Bug Tracker

Side navigation

#12671 closed bug (fixed)

Opened October 08, 2012 08:04AM UTC

Closed October 14, 2012 04:07PM UTC

Infinite loop on IE8 with pretty basic selector

Reported by: av01d Owned by: gibson042
Priority: low Milestone: None
Component: misc Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery 1.8.2 ends up in an infinite loop on IE8, when the following selector:

$("input[type='text']:first, :input[value='']:first");

is applied to this HTML:

<body>
    <input type="text" />
</body>

jsFiddle: http://jsfiddle.net/n6ksc/

IE9 and other browsers (FF, Chrome) are fine, haven't tested on IE7/6.

Attachments (0)
Change History (4)

Changed October 08, 2012 08:09AM UTC by av01d comment:1

Replying to [ticket:12671 av01d]:

Same problem when the selector is slightly changed to (added colon before first input):

$(":input[type='text']:first, :input[value='']:first");
jQuery 1.8.2 ends up in an infinite loop on IE8, when the following selector:
> $("input[type='text']:first, :input[value='']:first");
> 
is applied to this HTML:
> <body>
>     <input type="text" />
> </body>
> 
jsFiddle: http://jsfiddle.net/n6ksc/ IE9 and other browsers (FF, Chrome) are fine, haven't tested on IE7/6.

Changed October 08, 2012 08:14AM UTC by av01d comment:2

Replying to [ticket:12671 av01d]:

And the same problem also happens with this selector (no colons in front of the input's):

$("input[type='text']:first, input[value='']:first");

Single selectors

$("input[type='text']:first");
$("input[value='']:first");
$(":input[type='text']:first");
$(":input[value='']:first");

all work without issue in IE8.

jQuery 1.8.2 ends up in an infinite loop on IE8, when the following selector:
> $("input[type='text']:first, :input[value='']:first");
> 
is applied to this HTML:
> <body>
>     <input type="text" />
> </body>
> 
jsFiddle: http://jsfiddle.net/n6ksc/ IE9 and other browsers (FF, Chrome) are fine, haven't tested on IE7/6.

Changed October 09, 2012 02:11PM UTC by gibson042 comment:3

component: unfiledmisc
owner: → gibson042
priority: undecidedlow
status: newassigned

Changed October 14, 2012 04:07PM UTC by Timmy Willison comment:4

resolution: → fixed
status: assignedclosed

Update Sizzle: Fixes #12606, #12671, #12672.

Changeset: 077989e8c0c56ed059bffeb504cfd201e6c5c9cf