Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3282 closed defect (fixed)

dijit.base.Container.getChildren() returns children in reverse order on IE

Reported by: simonjb Owned by: alex
Priority: high Milestone: 0.9beta
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

I noticed a recent regression in PopupMenu key navigation on IE(6&7):

  • when you open the menu the last item is focused instead of the first
  • when you arrow to the top or bottom of the menu you get stuck -- focus does not cycle round

I traced this regression to a recent change in Container.js: on IE Container.getChildren() is returning the list of children in the reverse order to which they appear in the document.

I decided to have a go at writing up a DOH test case to show the behavior (and to test in future that we don't regress).

Attachments (2)

ContainerGetChildrenTest.diff (2.1 KB) - added by simonjb 12 years ago.
QueryTest.diff (1.1 KB) - added by simonjb 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by simonjb

comment:1 Changed 12 years ago by simonjb

Cc: alex added

Alex, I'm wondering if you would be able to have a quick look at my DOH test case please? It's the first I've written and I'm not sure that I did everything correctly/the best. Thanks!

comment:2 Changed 12 years ago by simonjb

Summary: dijit.Container.getChildren() returns children in reverse order on IEdijit.base.Container.getChildren() returns children in reverse order on IE

comment:3 Changed 12 years ago by simonjb

Attached test case.

It passes on FF but fails on IE 6 and 7.

comment:4 Changed 12 years ago by bill

Cc: alex removed
Owner: changed from bill to alex

I'm just calling dojo.query() in getChildren()... which I assumed would return the children in document order. Passing to Alex, at least for comment (and incorporation of unit test case). Good catch on this problem.

Changed 12 years ago by simonjb

Attachment: QueryTest.diff added

comment:5 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

Alex fixed this in [8959]

comment:6 Changed 12 years ago by bill

(In [9018]) Tests for getChildren() Patch from Simon Bates (CLA on file). Refs #3282

comment:7 Changed 12 years ago by bill

(In [9019]) More dojo.query() tests. Patch from Simon Bates (CLA on file). Refs #3282

Note that the dojo.query() test is currently failing, but the failure is unrelated to this new added test.

Note: See TracTickets for help on using tickets.