You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not digging much further, if the second load_node gets called because the first one is not completed, then create_node is not called again as expected and nothing gets created. This can be tested by adding a breakpoint in line 733. Doing that, the first load_node always finishes and the function completes ok.
By waiting to the open_node event, we're making sure we always step into create_node once the node is already loaded.
UPDATE Just to confirm, the load_node_json call just returns without doing nothing if the node is already being loaded, which causes the callback to create_node to get dropped without ever being called. Also, this check seems to have been removed in the v1.0 branch (https://github.com/vakata/jstree/blob/v.1.0/src/jstree.json.js)
Friday Nov 23, 2012 at 00:46 GMT
Originally opened as adobe/brackets#2198
This is a possible fix for #2085 by waiting on the
open_node.jstree
event before trying to create a new node.It looks like we're hitting a strange race condition in
jsquery.jstree.js
which appears when the node we want to open hasn't been loaded yet.In that case,
open_node
triggers aload_node
in line 640.Almost at the same time, a different
load_node
is triggered from the CRRMcreate
throughcreate_node
in line 734Not digging much further, if the second
load_node
gets called because the first one is not completed, thencreate_node
is not called again as expected and nothing gets created. This can be tested by adding a breakpoint in line 733. Doing that, the firstload_node
always finishes and the function completes ok.By waiting to the
open_node
event, we're making sure we always step intocreate_node
once the node is already loaded.UPDATE Just to confirm, the
load_node_json
call just returns without doing nothing if the node is already being loaded, which causes the callback tocreate_node
to get dropped without ever being called. Also, this check seems to have been removed in the v1.0 branch (https://github.com/vakata/jstree/blob/v.1.0/src/jstree.json.js)jbalsas included the following code: https://github.com/adobe/brackets/pull/2198/commits
The text was updated successfully, but these errors were encountered: