focus when ready
This commit is contained in:
parent
c5eabe4a4d
commit
2a73d5630b
|
|
@ -7,6 +7,7 @@ import { resize } from "./resize"
|
|||
import { autoScroll } from "./scrollback"
|
||||
import { sessionId } from "./session"
|
||||
import { send } from "./websocket"
|
||||
import { focusInput } from "./focus"
|
||||
|
||||
export const commands: string[] = []
|
||||
|
||||
|
|
@ -27,6 +28,7 @@ export const browserCommands: Record<string, (...args: string[]) => void | Promi
|
|||
document.body.dataset.mode = mode
|
||||
resize()
|
||||
autoScroll()
|
||||
focusInput()
|
||||
},
|
||||
reload: () => window.location.reload(),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { cmdInput } from "./dom"
|
|||
|
||||
export function initFocus() {
|
||||
window.addEventListener("click", focusHandler)
|
||||
setTimeout(() => focusInput(), 10)
|
||||
focusInput()
|
||||
}
|
||||
|
||||
export function focusInput() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user