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:
parent
67823c6642
commit
c8de51d03f
|
@ -5,6 +5,8 @@ https://github.com/josdejong/jsoneditor
|
||||||
|
|
||||||
## not yet released, version 5.5.5
|
## 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
|
- Fixed enum drop downs not working when the JSONEditor is configured with
|
||||||
a name.
|
a name.
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,6 @@ textmode.create = function (container, options) {
|
||||||
// create mode box
|
// create mode box
|
||||||
if (this.options && this.options.modes && this.options.modes.length) {
|
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) {
|
this.modeSwitcher = new ModeSwitcher(this.menu, this.options.modes, this.options.mode, function onSwitch(mode) {
|
||||||
me.modeSwitcher.destroy();
|
|
||||||
|
|
||||||
// switch mode and restore focus
|
// switch mode and restore focus
|
||||||
me.setMode(mode);
|
me.setMode(mode);
|
||||||
me.modeSwitcher.focus();
|
me.modeSwitcher.focus();
|
||||||
|
|
Loading…
Reference in New Issue