editor: data loss when leaving the editor's focus with no modifications

This commit is contained in:
jean-emmanuel 2021-12-19 14:28:14 +01:00
parent 490577b8a4
commit cb68a80309
3 changed files with 8 additions and 3 deletions

View file

@ -202,10 +202,10 @@ class UiInspectorField extends UiWidget {
editor.setHighlightActiveLine(false)
editor.setHighlightGutterLine(false)
editor.selection.setRange({start:0,end:0})
input.value = editor.getValue()
this.parent.focusedInput = input
if (editor.dirty) {
editor.dirty = false
input.value = editor.getValue()
this.parent.focusedInput = input
this.parent.onChange()
}