My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 231: Ephemeral error on node.reloadChildren() in FF 7.0.1
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Dec 2011


 
Reported by dariusz....@gmail.com, Oct 6, 2011
The error is rather ephemeral and raises only from time to time.

I uses:
 - Dynetree v1.2.0 (minimized version)
 - jQuery 1.5.2 (I cant use 1.6.4 because of some problems on IE8)
 - Firefox 7.0.1

In my web I have a tree with only one lazy "root" node.
If I expands that node, all subnodes loads fine. Than I do some drag and drop job to change its order and/or hierarchy. 
After that sometimes I needs to undo all changes so I reloads my lazy "root" node with code:

  $("#tree").dynatree("getTree").getNodeByKey("menuRoot").reloadChildren();

unfortunately from time to time I got error:
uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLUListElement.removeChild]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: http://localhost/jquery.dynatree.js :: <TOP_LEVEL> :: line 137"  data: no]

I've no idea why "ul" element don't have "removeChild" method but it seems that I can fix that problem by simple modification of dynatree code:

jquery.dynatree.js line 1394:
  if(this.ul){
    this.ul.removeChild(tn.li);
  }

  change to:

  $('li',$(this.ul)).remove()}

jquery.dynatree.min.js line 137:
  tn.removeChildren(true,retainPersistence);if(this.ul){this.ul.removeChild(tn.li);}}

  change to:
  tn.removeChildren(true,retainPersistence);$('li',$(this.ul)).remove()}

Oct 11, 2011
Project Member #1 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-Release1.2.1
Dec 28, 2011
Project Member #2 moo...@wwwendt.de
This issue was closed by revision r561.
Status: Fixed

Powered by Google Project Hosting