1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-25 15:30:03 +00:00

editor: set focus when switching between files

This commit is contained in:
Steven Hugg 2022-02-19 17:27:26 -06:00
parent 2d02b64464
commit 7b9f635bc0

View File

@ -76,6 +76,12 @@ export class SourceEditor implements ProjectView {
return div;
}
setVisible(showing: boolean): void {
if (showing) {
this.editor.focus(); // so that keyboard works when moving between files
}
}
newEditor(parent:HTMLElement, isAsmOverride?:boolean) {
var modedef = MODEDEFS[this.mode] || MODEDEFS.default;
var isAsm = isAsmOverride || modedef.isAsm;
@ -599,5 +605,5 @@ export class ListingView extends DisassemblerView implements ProjectView {
}
}
}
}
}