diff --git a/public/javascripts/tree_changes.js b/public/javascripts/tree_changes.js index ac6f9bcb3..941419807 100644 --- a/public/javascripts/tree_changes.js +++ b/public/javascripts/tree_changes.js @@ -66,6 +66,11 @@ const treeChanges = (function() { } let next = node.getNextSibling(); + + if (!next) { + next = node.getPrevSibling(); + } + if (!next) { next = node.getParent(); }