code editor: correctly detect tab-focus to reset scroll / cursor position
This commit is contained in:
parent
e5d5d0aa06
commit
54b7bf7a63
2 changed files with 7 additions and 2 deletions
|
|
@ -153,8 +153,12 @@ class CodeEditor {
|
|||
this.editor.dirty = true
|
||||
})
|
||||
|
||||
var pos = this.editor.getCursorPosition()
|
||||
if (pos.row === undefined || pos.column === undefined) this.editor.gotoLine(0)
|
||||
setTimeout(()=>{
|
||||
var pos = this.editor.getCursorPosition()
|
||||
if (pos.row === undefined || pos.column === undefined) {
|
||||
this.editor.gotoLine(0)
|
||||
}
|
||||
})
|
||||
|
||||
this.typing = false
|
||||
setCommandEnabled(this.editor, 'indent', false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue