console: visually indicate focus and blur with escape key

This commit is contained in:
jean-emmanuel 2026-08-24 10:49:43 +02:00
parent 883fb811e8
commit 81d5e84044
2 changed files with 11 additions and 0 deletions

View file

@ -105,6 +105,12 @@ class UiConsole extends UiSidePanel {
this.inputSize()
})
this.messages.addEventListener('keydown', (event)=>{
if (event.key == 'Escape') {
this.messages.blur()
}
})
if (!READ_ONLY) this.enable()
}

View file

@ -60,6 +60,11 @@ osc-console {
overflow-y: auto;
border-bottom: 1rem dotted rgba(255,255,255,0.2);
user-select: text;
&:focus {
outline: 1rem dotted var(--color-accent);
outline-offset: -1rem;
}
}
osc-console-message {