Skip to content

Commit a7444bf

Browse files
fix(ui): restore focus in stacked dialogs (anomalyco#44928)
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
1 parent 69aaa22 commit a7444bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/ui/src/context/dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ function init() {
8888
setClosing = setClosingSignal
8989
return (
9090
<Kobalte
91-
modal
91+
modal={stack().at(-1)?.id === id}
9292
open={!closing()}
9393
onOpenChange={(open: boolean) => {
94-
if (open) return
94+
if (open || stack().at(-1)?.id !== id) return
9595
close(id)
9696
}}
9797
>

0 commit comments

Comments
 (0)