Fix #908: editor throwing an exception when switching from `'preview'` to `'code'` mode
This commit is contained in:
parent
582645df70
commit
3ad5c9f9c1
|
@ -3,6 +3,12 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet published, version 8.6.1
|
||||
|
||||
- Fix #908: editor throwing an exception when switching from `'preview'`
|
||||
to `'code'` mode.
|
||||
|
||||
|
||||
## 2020-02-16, version 8.6.0
|
||||
|
||||
- Fixed #906: Implemented turning Python objects containing `True`, `False`
|
||||
|
|
|
@ -230,7 +230,7 @@ Constructs a new JSONEditor.
|
|||
|
||||
- `{boolean} history`
|
||||
|
||||
Enables history, adds a button Undo and Redo to the menu of the JSONEditor. `true` by default. Only applicable when `mode` is 'tree' or 'form'.
|
||||
Enables history, adds a button Undo and Redo to the menu of the JSONEditor. `true` by default. Only applicable when `mode` is `'tree'`, `'form'`, or `'preview'`.
|
||||
|
||||
- `{String} mode`
|
||||
|
||||
|
|
|
@ -424,8 +424,10 @@ previewmode.destroy = function () {
|
|||
|
||||
this._debouncedValidate = null
|
||||
|
||||
if (this.history) {
|
||||
this.history.clear()
|
||||
this.history = null
|
||||
}
|
||||
|
||||
// Removing the FocusTracker set to track the editor's focus event
|
||||
this.frameFocusTracker.destroy()
|
||||
|
|
Loading…
Reference in New Issue