Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MenuButton): prevent react-aria scrolljacking #1292

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

akdetrick
Copy link
Collaborator

closes NDS-390

  • Use react-laag useLayer hook for popover instead of the react-aria Popover. This avoids problematic behaviors from react-aria, like scrolling top and locking body scroll.
  • Refactor use of closePopover so that the onAction of the Menu component is called before the popover closes

Tested against banking in 3.46.0-beta.{patch} releases.

@graphicsforge graphicsforge self-requested a review July 24, 2024 13:35
Copy link
Contributor

@graphicsforge graphicsforge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it was react-aria's Popover that was the culprit!!!

Copy link

📘 Storybook Preview Available 👀

View the Storybook build from this PR in your browser:
https://60620d422ffdf100216415b2-fegguppqtk.chromatic.com/

(This action will publish a new comment and url if this PR is modified)

@akdetrick akdetrick merged commit 9b603db into main Jul 30, 2024
7 checks passed
@narmirobot
Copy link

🎉 This PR is included in version 3.45.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants