Opened 13 years ago
Closed 9 years ago
#7345 closed defect (fixed)
dojo.query I.E children property not document object
Reported by: | dave_daniel | Owned by: | dylan |
---|---|---|---|
Priority: | low | Milestone: | 1.7 |
Component: | Query | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
in dojo._base.query 'childNodesName' is set to 'children' if browser is IE but in the function _childElements if the document object is passed in the line 'tret = root[childNodesName];' will fail because the document object doesn't have a children property. You will probably need to see if root is a document object and if it is then use 'childNodes' instead of 'children'
Attachments (1)
Change History (16)
comment:1 Changed 13 years ago by
Keywords: | query added |
---|---|
Milestone: | tbd → 1.2 |
Owner: | changed from anonymous to alex |
comment:2 Changed 12 years ago by
Milestone: | 1.2 → 1.3 |
---|
comment:3 Changed 12 years ago by
is there a unit test that shows the failure? I'm somewhat disinclined to fix w/o a test case since I'm having a hard time imagining one that would fail but where we would also pass the current unit tests.
comment:4 Changed 12 years ago by
Status: | new → assigned |
---|
comment:5 Changed 12 years ago by
Milestone: | 1.3 → 1.4 |
---|
1.3rc1 has been release; bumping remaining tickets to 1.4 (except for documentation/testing tickets)
comment:6 Changed 11 years ago by
Component: | General → Query |
---|
comment:7 Changed 11 years ago by
Milestone: | 1.4 → tbd |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
Alex indicated needing a test to see where this would fail, but no test so far. Closing for now, but feel free to reopen with a test case.
comment:8 Changed 11 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
The following simple code will cause this error to happen in IE8 with the document in IE7 standards mode:
dojo.query("> [widgetid]");
I used the following docType:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
I encountered this when dijit calls _Widget.destroyRecursive on a dijit._Container during page-unload. This invokes the aforementioned dojo.query call, but with a second argument of "this.containerNode". Unfortunately, this.containerNode is null (presumably because the page is in the process of unloading?).
Changed 11 years ago by
Attachment: | dojo-query-ie.html added |
---|
simple test case that throws an error immediately
comment:9 Changed 11 years ago by
Not sure why you are seeing that problem on page unload (where this.containerNode is not set) but if you have a test case please file a separate ticket. Sounds like things are getting destroyed out of order. I know _Templated.destroyRendering() nulls out attach points to prevent memory leaks but it should run last, after destroyDescendants().
comment:10 Changed 11 years ago by
Yeah, I haven't nailed that (page unload) case quite down, so I'm not certain about it. Regardless, the one-liner in my test-case above triggers an error, and I believe the behavior is exactly as stated in the original description of this bug. That is, this particular bug has little to do with page unload or destroyRecursive, that just happened to be where it was manifesting for me.
comment:11 Changed 11 years ago by
Milestone: | tbd → future |
---|
comment:12 Changed 11 years ago by
I got the same problem, it occurs in some places that I call destroyRecursive method on some widgets, it fails on the getChildren method which use css query "> [widgetId]". IE8, dojo 1.4.3. Ref #11378
comment:14 Changed 9 years ago by
Keywords: | needsreview added |
---|---|
Priority: | high → low |
comment:15 Changed 9 years ago by
Keywords: | query needsreview removed |
---|---|
Milestone: | future → 1.7 |
Resolution: | → fixed |
Status: | reopened → closed |
Kris fixed in [25510].
as per today's meeting, punting these core bugs