summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-12-15 04:58:01 -0600
committerAdam <[email protected]>2025-12-15 10:20:16 -0600
commitacd91bddf7e83591d60f6801b7d34685a7f3f256 (patch)
tree673124b4a37e06a63af93d591bde8bb77d4e9a30 /packages/ui/src
parent3a14ca044ca521d1ab24c04da8e9e3bab9e2de58 (diff)
downloadopencode-acd91bddf7e83591d60f6801b7d34685a7f3f256.tar.gz
opencode-acd91bddf7e83591d60f6801b7d34685a7f3f256.zip
wip(desktop): progress
Diffstat (limited to 'packages/ui/src')
-rw-r--r--packages/ui/src/components/dialog.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx
index 47d6af42e..40a6ac83d 100644
--- a/packages/ui/src/components/dialog.tsx
+++ b/packages/ui/src/components/dialog.tsx
@@ -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">