You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eb7026c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(Dialog): re-key auto-focus on presence when force-mounted (#2856)
`DialogContent` folded `forceMount` into `Presence`'s `present`, pinning it to
`true`. The content then never unmounted, so `FocusScope` never remounted and
`openAutoFocus` fired exactly once — at mount, before the dialog had ever been
opened, stealing focus into a closed dialog and locking body scroll.
The `present` watcher added for `unmountOnHide` could not compensate either:
the value passed down was `unmountOnHide || present`, a constant `true` under
the default `unmountOnHide: true`, so it never saw a transition.
Separate the two concerns. `:force-mount` keeps the node in the DOM, while
`:present` now carries the real open state. `forceMount` stays in the `v-show`
expression so a force-mounted dialog remains visible and the consumer keeps
control of its own animation.
`DialogOverlay` needs the identical change: its `present` drives the body
scroll lock, which otherwise stayed locked after dismissing a force-mounted
dialog.
Closes#2450
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments