feature(console): autofocus input field after click on a command

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-09-04 12:13:10 +02:00
parent f83d33b20d
commit 44c43a6fb5
2 changed files with 8 additions and 0 deletions

View File

@ -139,6 +139,10 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
commandClick(msg: string): void {
this.gcode = msg
this.$nextTick(() => {
this.$refs.gcodeCommandField.focus()
})
}
doSend(cmd: KeyboardEvent) {

View File

@ -133,6 +133,10 @@ export default class PageConsole extends Mixins(BaseMixin) {
commandClick(msg: string): void {
this.gcode = msg
this.$nextTick(() => {
this.$refs.gcodeCommandField.focus()
})
}
doSend(cmd: KeyboardEvent): void {