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

@ -1,5 +1,10 @@
# Changelog
## 1.13.1
- bug fixes
- editor: data loss when leaving the editor's focus with no modifications
## 1.13.0
- bug fixes

View file

@ -2,7 +2,7 @@
"name": "open-stage-control",
"productName": "Open Stage Control",
"description": "Libre and modular OSC / MIDI controller",
"version": "1.13.0",
"version": "1.13.1",
"author": {
"name": "Jean-Emmanuel Doucet",
"email": "jean-emmanuel@ammd.net"

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()
}