#7614 closed bug (cantfix)
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.
Change History (7)
comment:1 Changed 12 years ago by
Cc: | miketaylr added |
---|---|
Component: | unfiled → selector |
Milestone: | 1.5 |
Priority: | undecided → low |
Status: | new → open |
Version: | 1.4.3 → 1.4.4 |
comment:2 Changed 12 years ago by
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').
comment:3 follow-up: 4 Changed 12 years ago by
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.
comment:4 Changed 12 years ago by
Replying to 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.
comment:5 Changed 12 years ago by
Keywords: | needsreview added |
---|---|
Milestone: | → 1.next |
Still present in opera11 :/
comment:6 Changed 12 years ago by
Keywords: | needsreview removed |
---|---|
Resolution: | → cantfix |
Status: | open → closed |
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.
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