Skip to content

Dialog/Drawer: fix focus-restore scroll and dispose-while-open cleanup#42544

Open
mdo wants to merge 2 commits into
v6-devfrom
mdo/audit-dialog-drawer-issues
Open

Dialog/Drawer: fix focus-restore scroll and dispose-while-open cleanup#42544
mdo wants to merge 2 commits into
v6-devfrom
mdo/audit-dialog-drawer-issues

Conversation

@mdo

@mdo mdo commented Jun 23, 2026

Copy link
Copy Markdown
Member

Two small dialog/drawer fixes, one per commit:

Unit tests added/updated for both; full suite passes.

🤖 Generated with Claude Code

mdo added 2 commits June 23, 2026 15:32
Pass { preventScroll: true } when returning focus to the trigger after
close, so the page no longer jumps to the trigger (or to the top when
scroll-padding-top is set). Fixes #38070, #41615, #35391.
dispose() now closes the native <dialog> and removes the dialog-open
body class if the instance is torn down while still open (e.g. an SPA
route change), instead of leaving overflow: hidden stuck on the body.
Fixes #35934, #39910.
@mdo mdo requested a review from a team as a code owner June 23, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant