Opened 15 years ago
Closed 14 years ago
#1064 closed defect (wontfix)
Exception in Fireox after removing tree node: NS_ERROR_DOM_WRONG_DOCUMENT_ERR
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | low | Milestone: | 0.9 |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
After removing a node from a tree, scrolling the browser view throws exceptions:
Exception... "Node cannot be used in a document other than the one in which it was created" code: "4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" location: ".../dojo/dojo.js Line: 4204"]
This happens in dojo.style.getAbsolutePosition()
The offending line is:
var bo = document.getBoxObjectFor(node);
Steps to reproduce:
- Open Tree test #6 (release 0.3.1)
- Expand the uper tree widget
- Resize the browser window so you get a vertical scrollbar
- Scroll up/down (no error messages should show in the JS console)
- Remove a node (from the context menu: Remove)
- Scroll up/down
- The JS console shows the exception, after every scroll event again.
I did not find any visual effects with the tree widget, it looks as if it is behaving as it should. However, I suspect that there may be memory leaks from nodes which are not correctly removed.
If that's the case, this will become a problem for management of a large tree with lots of node removing operations, as I'm planning to do.
Change History (4)
comment:1 Changed 15 years ago by
Priority: | normal → low |
---|
comment:2 Changed 15 years ago by
For a workaround, comment out lines 295-303. getBoxObjectFor is only needed for certain corner cases, iirc, calculating page margins when:
style{ html{ overflow: hidden }}
lines 295-303
/*}else if(document.getBoxObjectFor){ // mozilla try{ var bo = node.ownerDocument.getBoxObjectFor(node); ret.x = bo.x - ds.sumAncestorProperties(node, "scrollLeft"); ret.y = bo.y - ds.sumAncestorProperties(node, "scrollTop"); }catch(e){ // squelch }*/
comment:3 Changed 15 years ago by
Milestone: | → 0.5 |
---|
comment:4 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The Tree in dijit doesn't even support removing nodes, so I'm gonna close this bug.
Oops, seems to be a known bug in Firefox 1.5.0.4, reverting to FF 1.5.0.3 completely got rid of these messages...
See Bugzilla: bug 340084
(still a work around in Dojo would be nice - if possible!)