Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9921 closed bug (invalid)

Compound selectors dont work well in IE7

Reported by: stuart.innes@… Owned by: stuart.innes@…
Priority: low Milestone: None
Component: event Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:

Description

tried something like in IE7 $(".item1 a, .item2 a").live('click',function(){

do stuff

})

The script will timeout(prompt to force stop) with medium data-sets (about 150-200 matching items)or takes an inordinate length of time to complete.

Change History (4)

comment:1 Changed 8 years ago by timmywil

Component: unfiledevent
Owner: set to stuart.innes@…
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 8 years ago by dmethvin

It wouldn't surprise me that this peformed poorly in IE6/7, since the only way to satisfy that query is to make a pass through the entire document to find the correct classes and descendants. And it has to be done each time a click occurs. Other browsers support querySelectorAll so they can do this faster.

Try a better-qualified selector, using ids or just a single class selector qualified by a tag name, such as div.itemX.

comment:3 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:4 in reply to:  description Changed 8 years ago by alex@…

Replying to stuart.innes@…:

tried something like in IE7 $(".item1 a, .item2 a").live('click',function(){

do stuff

})

The script will timeout(prompt to force stop) with medium data-sets (about 150-200 matching items)or takes an inordinate length of time to complete.

the bug is that selecting $('#a #b #c'); is not working in ie7, to solve it I used $('#a #b').find('#c');

this bug should be reopened

Note: See TracTickets for help on using tickets.