Opened 12 years ago

Last modified 12 years ago

#9850 closed defect

problem with dojo.query in ff3.5 — at Initial Version

Reported by: mpalmer Owned by: anonymous
Priority: high Milestone: tbd
Component: Query Version: 1.3.1
Keywords: ff3.5 dojo.query Cc:
Blocked By: Blocking:

Description

The following simple snippet of code does not work in ff3.5:
dojo.query("> [widgetId]", undefined);

The error you get is "tret is undefined".
When no node is provided to dojo.query it takes the dojo.doc instead which is fine in earlier versions of ff. But, in ff3.5 the childNodesName is detected to be "children" instead of "childNodes" The check is for children being available on the firstChild of dojo.doc, but when dojo.query is called it must be available on dojo.doc directly which it isn't (no idea why ff3.5 works this way though).

This appeared for me when I had constructed a dijit with a grid inside without a explicit containerNode. On startup when getChildren is called on the grid it calls dojo.query without a node (since this.containerNode is not defined) and the error occurs.

Hence, there is a simple workaround, make sure dojo.query is never called wihout a node, in my case it was enough to make sure the containerNode is defined. But dojo.query should not break down so easily.

Change History (0)

Note: See TracTickets for help on using tickets.