Skip to main content

Bug Tracker

Side navigation

#7614 closed bug (cantfix)

Opened November 24, 2010 12:52PM UTC

Closed May 26, 2011 04:08AM UTC

Last modified December 01, 2011 09:00AM UTC

Order of selector expression returns different results for .find(selector) in Opera 10.63

Reported by: mechismo Owned by:
Priority: low Milestone: 1.next
Component: selector Version: 1.4.4
Keywords: Cc: miketaylr
Blocked by: Blocking:
Description

Working test case: http://jsfiddle.net/hd4NK/

In Opera 10.63 the following return different length collections:

    $("#con").find(".required, #bar, #btm :input");
    $("#con").find("#btm :input, .required, #bar");

when querying the following mark-up

<fieldset id="cont">
	<div id="top">
		<input type="text" class="required"  />
		<input type="text" id="bar"  />
	</div>
	<div id="btm">
		<input type="text" class="required2"  />
		<input type="text" id="foo"  />
	</div>
</fieldset>

All other browsers tested (FF 3.6, IE8, Safari5, Chrome8) return expected results. Same issue is in 1.4.4 too.

In 1.4.2 all browsers return the same results.

Attachments (0)
Change History (7)

Changed November 24, 2010 07:28PM UTC by jitter comment:1

_comment0: Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a testcase! \ \ I checked in on your test case and yes Opera does indeed return a different result from all other browsers. It looks to me like a bug in Opera's querySelectorAll implementation. [http://jsfiddle.net/jitter/X2t67/ test case] \ \ CC-ing miketaylr on this one.1290627277920979
cc: → miketaylr
component: unfiledselector
milestone: 1.5
priority: undecidedlow
status: newopen
version: 1.4.31.4.4

Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a testcase!

I checked in on your test case and yes Opera does indeed return a different result from all other browsers. It is a a bug in Opera's querySelectorAll implementation.

CC-ing miketaylr on this one. <-- test case for you

Changed November 24, 2010 08:45PM UTC by miketaylr comment:2

Yeah, the bug appears to be that qSA isn't throwing for an unsupported pseudo-class if there is a valid part first. So document.querySelectorAll(':foo, input') will throw, but not document.querySelectorAll('input, :foo').

Changed November 25, 2010 10:30AM UTC by mechismo comment:3

Fair enough. Interesting that is worked OK in 1.4.2 which indicates to me that it's maybe not a bug in Opera but I haven't dug deeply into this. Maybe jQuery wasn't using native qSA in 1.4.2 for Opera.

Changed November 25, 2010 03:00PM UTC by jitter comment:4

Replying to [comment:3 mechismo]:

Fair enough. Interesting that is worked OK in 1.4.2 which indicates to me that it's maybe not a bug in Opera but I haven't dug deeply into this. Maybe jQuery wasn't using native qSA in 1.4.2 for Opera.

No it is a bug in Opera. There were some internal changes from jQuery 1.4.2 to 1.4.4 which caused this to become apparent.

Changed March 31, 2011 04:04AM UTC by danheberden comment:5

keywords: → needsreview
milestone: → 1.next

Still present in opera11 :/

Changed May 26, 2011 04:08AM UTC by dmethvin comment:6

keywords: needsreview
resolution: → cantfix
status: openclosed

I think we clearly established that this was an Opera bug we can't work around, and miketaylr's buddies are hot on the case.

Changed December 01, 2011 09:00AM UTC by sindresorhus comment:7

#10921 is a duplicate of this ticket.