fix(ActionMenu): correct action menu scrolling on open#2248
Open
fix(ActionMenu): correct action menu scrolling on open#2248
Conversation
The documentation changes were exploratory and not needed for the fix. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Bracciata
commented
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an ActionMenu open-time scroll jump by delaying focus until after layout has completed.
Changes:
- Defers focusing the ActionMenu list via a double
requestAnimationFramewhenopenbecomes true.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Updated tests to wait for the ActionList to be focused after the double requestAnimationFrame completes before interacting with keyboard events. This ensures the async focus operation has completed before the tests continue with keyboard interactions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Zidious
previously requested changes
Feb 11, 2026
Zidious
previously requested changes
Feb 12, 2026
Contributor
Zidious
left a comment
There was a problem hiding this comment.
Left a comment inline -
I'll leave final 👀 to @anastasialanz - I'm not too familiar with requestAnimationFrame to give an educated opinion.
chornonoh-vova
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/dequelabs/walnut/issues/13307
This fix prevents a bug where when there was a large list of ActionMenus in one container on first open it may scroll to the top of the page.
This bug be reproduced by reverting the changes in this pr and scrolling down to the bottom of a page rendered with this MDX