Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12671 closed bug (fixed)

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.

Change History (4)

comment:1 in reply to:  description Changed 7 years ago by av01d

Replying to 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.

comment:2 in reply to:  description Changed 7 years ago by av01d

Replying to 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.

comment:3 Changed 7 years ago by gibson042

Component: unfiledmisc
Owner: set to gibson042
Priority: undecidedlow
Status: newassigned

comment:4 Changed 7 years ago by Timmy Willison

Resolution: fixed
Status: assignedclosed

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

Changeset: 077989e8c0c56ed059bffeb504cfd201e6c5c9cf

Note: See TracTickets for help on using tickets.