editor: fix quirck on blur

This commit is contained in:
jean-emmanuel 2021-12-14 09:36:35 +01:00
parent cd50f76cb4
commit fc09b2d444
2 changed files with 7 additions and 6 deletions

View file

@ -179,14 +179,15 @@ class UiInspectorField extends UiWidget {
editor.setHighlightActiveLine(true)
editor.setHighlightGutterLine(true)
editor.removeAllListeners('blur')
editor.removeAllListeners('change')
editor.on('change', (e)=>{
input.value = editor.getValue()
})
editor.on('blur', (e)=>{
if (input.value !== editor.getValue()) {
input.value = editor.getValue()
this.parent.focusedInput = input
this.parent.onChange()
}
this.parent.focusedInput = input
editor.setHighlightActiveLine(false)
editor.setHighlightGutterLine(false)
this.parent.onChange()
})
})

View file

@ -135,7 +135,7 @@ osc-inspector-field .ace_editor {
}
.ace_marker-layer .ace_selected-word {
border: none;
border-bottom: 1rem solid rgba(white, 0.2);//1rem solid #3d4350;
border-bottom: 1rem solid rgba(white, 0.2);
background: none;
}
.ace_fold {