Fixed #298: Switch mode button disappears when switching from text/code to tree/form/view mode when the JSON contained errors

This commit is contained in:
jos 2016-05-23 21:27:34 +02:00
parent 67823c6642
commit c8de51d03f
2 changed files with 2 additions and 2 deletions

View File

@ -5,6 +5,8 @@ https://github.com/josdejong/jsoneditor
## not yet released, version 5.5.5
- Fixed #298: Switch mode button disappears when switching from text/code to
tree/form/view mode when the JSON contained errors.
- Fixed enum drop downs not working when the JSONEditor is configured with
a name.

View File

@ -126,8 +126,6 @@ textmode.create = function (container, options) {
// create mode box
if (this.options && this.options.modes && this.options.modes.length) {
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();