| Issue 495: | TypeError: parent.li is (sometimes) null at line 411 | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Called activate() on a node, but only fails 25% of the time
What is the expected output? What do you see instead?
In the Firefox console:
"13:19:24.743 - bind(" Object { originalEvent: click, type: "click", isDefaultPrevented: returnFalse(), timeStamp: 139497805, jQuery19102235185644524572: true, toElement: undefined, screenY: 752, screenX: 117, pageY: 650, pageX: 112, 22 more… } "): dtnode: " Object { parent: Object, tree: Object, data: Object, li: <li>, span: <span.dynatree-node.dynatree-exp-c.dynatree-ico-c.dynatree-focused>, ul: null, childList: null, _isLoading: false, hasSubSel: false, bExpanded: false, 1 more… } ", error: " TypeError: parent.li is null
Stack trace:
DynaTreeNode.prototype.render@http://localhost:8162/dynatree/jquery.dynatree.js:411:6
storeNode@http://localhost:8162/tree-ui.js:432:35
initTree/<.onQueryActivate@http://localhost:8162/tree-ui.js:77:6
DynaTreeNode.prototype._activate@http://localhost:8162/dynatree/jquery.dynatree.js:843:47
DynaTreeNode.prototype.activate@http://localhost:8162/dynatree/jquery.dynatree.js:889:3
DynaTreeNode.prototype._userActivate@http://localhost:8162/dynatree/jquery.dynatree.js:928:4
DynaTreeNode.prototype._onClick@http://localhost:8162/dynatree/jquery.dynatree.js:1262:4
.bind/<@http://localhost:8162/dynatree/jquery.dynatree.js:3000:84
jQuery.event.dispatch@http://localhost:8162/bootstrap/js/jquery/js/jquery-1.9.1.js:3073:15
jQuery.event.add/elemData.handle@http://localhost:8162/bootstrap/js/jquery/js/jquery-1.9.1.js:2750:6
jquery.dynatree.js:54
What version of the dynatree and jQuery are you using?
dynatree 1.2.6
jQuery 1.9.1
jQuery-UI 1.10.3
On what operating system and browser?
Mac OS X 10.10.2, Firefox 35.0.1
What DOCTYPE declaration are you using?
<!DOCTYPE html>
Please provide any additional information below.
activate() is being called by an onClick event from an "<a>" link. When onQueryActivate() fires with the second argument 'true', my code does some validation work that takes a few milliseconds before deciding if it's ok to return true. The error only occurs when that returns true of course, since the node wouldn't activate otherwise. Since it happens somewhat randomly, it sounds like a timing/thread problem?
Feb 11, 2015
Project Member
#1
moo...@wwwendt.de
Status:
Waiting
|