diff --git a/HISTORY.md b/HISTORY.md index 86b984c..46f7c2a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -10,7 +10,7 @@ https://github.com/josdejong/jsoneditor - Fixed #590: validation failing in code and text mode when status bar is disabled. - Fixed #589: the path in the navigation bar is not updated - when deleting a node. + when duplicating or removing a node, and neither after an undo/redo action. - Fixed duplicate and remove of the action menu of multiple selected nodes not working. - Fixed not preventing default selection of text when selecting nodes. diff --git a/src/js/treemode.js b/src/js/treemode.js index bde7849..07440aa 100644 --- a/src/js/treemode.js +++ b/src/js/treemode.js @@ -500,6 +500,9 @@ treemode._onChange = function () { return; } + // selection can be changed after undo/redo + this.selection = this.getDomSelection(); + // validate JSON schema (if configured) this._debouncedValidate();