console: visually indicate focus and blur with escape key
This commit is contained in:
parent
883fb811e8
commit
81d5e84044
2 changed files with 11 additions and 0 deletions
|
|
@ -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()
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue