Opened 11 years ago

Closed 8 years ago

#8223 closed defect (duplicate)

dojo.query: results reversed for ".foo .bar"

Reported by: bill Owned by: dylan
Priority: low Milestone: future
Component: Query Version: 1.2.1
Keywords: needsreview Cc:
Blocked By: Blocking:

Description

In dijit/tests/layout/test_AccordionContainer_prog.html, try this in FF console:

dojo.query(".dijitAccordionTitle .dijitAccordionText")[0].innerHTML

It returns "pane 3", not "pane 1" as I expected.

Seems like a bug although I'm not sure if we've officially guaranteed the results to be in document order.

Tested on FF3 and Safari.

Attachments (1)

query.html (1.2 KB) - added by dante 11 years ago.
test case showing several different queries. only two sets returned: orig and reversed

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by dante

fyi:

dojo.query(".dijitAccordionTitle").query(".dijitAccordionText")[0].innerHTML

returns the "proper" first element you are looking for. though I'm not certain we've ever promised the NodeList? to appear in the order of the dom.

Changed 11 years ago by dante

Attachment: query.html added

test case showing several different queries. only two sets returned: orig and reversed

comment:2 Changed 11 years ago by dante

Milestone: tbdfuture
Owner: changed from anonymous to alex

comment:3 Changed 10 years ago by bill

Component: CoreQuery

comment:4 Changed 9 years ago by Chris Mitchell

Owner: changed from alex to dylan

please review/triage

comment:5 Changed 8 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

I've come across similar situations. Should we close as wontfix based on order has never been guaranteed?

comment:6 Changed 8 years ago by ben hockey

Resolution: duplicate
Status: newclosed

Duplicate of #9191.
#9191 is basically a duplicate of this

Note: See TracTickets for help on using tickets.