wip(desktop): progress

This commit is contained in:
Adam 2025-12-15 04:58:01 -06:00
parent 3a14ca044c
commit acd91bddf7
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 13 additions and 0 deletions

View file

@ -185,6 +185,11 @@ export default function Page() {
return
}
// Don't interfere with dialogs
if (dialog.stack.length > 0) {
return
}
const focused = document.activeElement === inputRef
if (focused) {
if (event.key === "Escape") {

View file

@ -20,6 +20,14 @@ export function Dialog(props: DialogProps) {
...(props.classList ?? {}),
[props.class ?? ""]: !!props.class,
}}
onOpenAutoFocus={(e) => {
const target = e.currentTarget as HTMLElement | null
const autofocusEl = target?.querySelector("[autofocus]") as HTMLElement | null
if (autofocusEl) {
e.preventDefault()
autofocusEl.focus()
}
}}
>
<Show when={props.title || props.action}>
<div data-slot="dialog-header">