Fix #892: the undo/redo buttons in mode `code` being broken when custom loading an old version of Ace Editor
This commit is contained in:
parent
11b8a04ff3
commit
5e467ad968
|
@ -3,6 +3,12 @@
|
||||||
https://github.com/josdejong/jsoneditor
|
https://github.com/josdejong/jsoneditor
|
||||||
|
|
||||||
|
|
||||||
|
## 2020-02-06, version 8.5.3
|
||||||
|
|
||||||
|
- Fix #892: the undo/redo buttons in mode `code` being broken when custom
|
||||||
|
loading an old version of Ace Editor.
|
||||||
|
|
||||||
|
|
||||||
## 2020-02-05, version 8.5.2
|
## 2020-02-05, version 8.5.2
|
||||||
|
|
||||||
- Fix undo/redo buttons in mode `code` not always updating.
|
- Fix undo/redo buttons in mode `code` not always updating.
|
||||||
|
|
|
@ -428,8 +428,10 @@ textmode._updateHistoryButtons = function () {
|
||||||
if (this.aceEditor && this.dom.undo && this.dom.redo) {
|
if (this.aceEditor && this.dom.undo && this.dom.redo) {
|
||||||
const undoManager = this.aceEditor.getSession().getUndoManager()
|
const undoManager = this.aceEditor.getSession().getUndoManager()
|
||||||
|
|
||||||
this.dom.undo.disabled = !undoManager.canUndo()
|
if (undoManager && undoManager.hasUndo && undoManager.hasRedo) {
|
||||||
this.dom.redo.disabled = !undoManager.canRedo()
|
this.dom.undo.disabled = !undoManager.hasUndo()
|
||||||
|
this.dom.redo.disabled = !undoManager.hasRedo()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue