Skip to content

Commit

Permalink
Fix fast expand/collapse of folder leads to inconsistent state
Browse files Browse the repository at this point in the history
Close #1029
  • Loading branch information
mar10 committed Aug 27, 2020
1 parent 513d40f commit 3d6e1a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 2.36.2 / Unreleased
* [Fixed] #1022 ext-persist: Handle 'Access is denied for this document'
* [Fixed] #1028 Uncaught TypeError: apply is not a function (regression of #1019)

* [Fixed] #1029 Fast expand/collapse of folder leads to inconsistent state

# 2.36.1 / 2020-07-25
* [Fixed] #1021 ext-dnd5 Regression (#1012) in drop marker

Expand Down
7 changes: 7 additions & 0 deletions src/jquery.fancytree.js
Original file line number Diff line number Diff line change
Expand Up @@ -5390,6 +5390,13 @@

// node.debug("nodeSetExpanded(" + flag + ")");

if ($(node.li).hasClass(opts._classNames.animating)) {
node.warn(
"setExpanded(" + flag + ") while animating: ignored."
);
return _getRejectedPromise(node, ["recursion"]);
}

if ((node.expanded && flag) || (!node.expanded && !flag)) {
// Nothing to do
// node.debug("nodeSetExpanded(" + flag + "): nothing to do");
Expand Down

0 comments on commit 3d6e1a4

Please sign in to comment.