diff --git a/HISTORY.md b/HISTORY.md index c845a34..d204330 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,12 @@ https://github.com/josdejong/jsoneditor +## not yet released, version 5.24.1 + +- Fixed #568: mode switcher disappearing when selecting the current + mode again. + + ## 2018-08-22, version 5.24.0 - Implemented a color picker, and allow hooking in a custom color diff --git a/src/js/treemode.js b/src/js/treemode.js index d127e9e..44da2a3 100644 --- a/src/js/treemode.js +++ b/src/js/treemode.js @@ -1043,8 +1043,6 @@ treemode._createFrame = function () { if (this.options && this.options.modes && this.options.modes.length) { var me = this; this.modeSwitcher = new ModeSwitcher(this.menu, this.options.modes, this.options.mode, function onSwitch(mode) { - me.modeSwitcher.destroy(); - // switch mode and restore focus me.setMode(mode); me.modeSwitcher.focus();