Opened 16 years ago

Closed 15 years ago

#1064 closed defect (wontfix)

Exception in Fireox after removing tree node: NS_ERROR_DOM_WRONG_DOCUMENT_ERR

Reported by: Joe la Poutre <[email protected]…> Owned by: anonymous
Priority: low Milestone: 0.9
Component: Widgets Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


After removing a node from a tree, scrolling the browser view throws exceptions:

"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

The offending line is:

var bo = document.getBoxObjectFor(node);

Steps to reproduce:

  • 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 16 years ago by [email protected]

Priority: normallow

Oops, seems to be a known bug in Firefox, reverting to FF completely got rid of these messages...

See Bugzilla: bug 340084

(still a work around in Dojo would be nice - if possible!)

comment:2 Changed 16 years ago by sjmiles

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
		var bo = node.ownerDocument.getBoxObjectFor(node);
		ret.x = bo.x - ds.sumAncestorProperties(node, "scrollLeft");
		ret.y = bo.y - ds.sumAncestorProperties(node, "scrollTop");
		// squelch

comment:3 Changed 16 years ago by dylan

Milestone: 0.5

comment:4 Changed 15 years ago by bill

Resolution: wontfix
Status: newclosed

The Tree in dijit doesn't even support removing nodes, so I'm gonna close this bug.

Note: See TracTickets for help on using tickets.