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 f416250
Browse filesBrowse the repository at this point in the historyBrowse files
Larry
committed
Count only closing popups as the closing tree, and gate the exit in the test
Review found two problems.
useFinalFocusUnlessMoved treated focus under any [data-closed] ancestor as
not moved. Base UI also marks collapsed Collapsible and Accordion roots
data-closed, and visible controls can sit inside them. The exception now
matches only popup roles (menu, dialog, alertdialog, listbox).
menu-dismiss.spec relied on a 400ms transition, so the race might not
happen. The test now pauses the menu's exit transition when it starts,
checks that closing has started, moves focus while the menu is still
mounted, and then releases the transition. It also waits until the
entrance has settled: an Escape before the entrance starts closes with no
transition to hold. A new case moves focus under an unrelated data-closed
container.
Fail-before, 10 runs per engine, chromium and webkit:
- without the hook's moved check: 10/10 fail (focus pulled to the row)
- with the old broad [data-closed] match: 10/10 fail (collapsed case)
- with this change: 10/10 pass
Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
0 commit comments