Opened 13 years ago

Closed 13 years ago

#9665 closed defect (invalid)

NodeList - can't select mulitple children elements

Reported by: Les Owned by: James Burke
Priority: high Milestone: 1.4
Component: Core Version: 1.3.2
Keywords: NodeList.children Cc:
Blocked By: Blocking:


This code should return 7 elements, but it returns an empty array.


This code however returns all 7 elements:


Change History (3)

comment:1 Changed 13 years ago by Les

This also works fine (7 elements returned):


comment:2 Changed 13 years ago by James Burke

Component: GeneralCore
Milestone: tbd1.4
Owner: changed from anonymous to James Burke

This happens because dojo._filterQueryResult is used underneath, and it is a very basic filter: just handles a simple selector that can be applied on one node without context.

I will look at switching all of those _filterQueryResult calls to just use dojo.query.

comment:3 Changed 13 years ago by James Burke

Resolution: invalid
Status: newclosed

This is actually working as designed, there are no immediate children of #inputForm that are input or select elements, the immediate children are divs that contain the elements. dojo.query('#inputForm').query('input,select') works because it is not restricting itself to immediate children but considers all nested children.

There is still a deficiency with the selectors supported by children, but I will use #10029 to track that.

Note: See TracTickets for help on using tickets.