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

Perform ActionMenu actions after overlay has closed #1200

Merged
merged 2 commits into from
Apr 30, 2021
Merged

Conversation

dgreif
Copy link
Member

@dgreif dgreif commented Apr 30, 2021

This is an alternate approach to solve the problems addressed by #1188. When an action is selected from the menu, we want to wait until the menu has closed the overlay before performing the action. This is important in situations where the action moves focus to a different element on the page. Without this change, the focus change from the action would be detected by the overlay focus trap, preventing focus from actually shifting to the intended target. While #1188 did present two valid ways of solving this problem, @T-Hugs and @smockle agreed that the approach in this PR is a simpler solution for the immediate issue.

Closes #1188

Screenshots

CleanShot 2021-04-30 at 11 48 09

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@changeset-bot
Copy link

changeset-bot bot commented Apr 30, 2021

🦋 Changeset detected

Latest commit: 16c170a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/v1i5SCCjnqVtCwAboB69GhTndqtn
✅ Preview: https://primer-components-git-action-after-close-primer.vercel.app

@vercel vercel bot temporarily deployed to Preview April 30, 2021 20:29 Inactive
@vercel vercel bot temporarily deployed to Preview April 30, 2021 20:32 Inactive
Copy link
Member

@smockle smockle left a comment

Choose a reason for hiding this comment

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

Thanks for updating this! 🎊

Copy link
Contributor

@VanAnderson VanAnderson left a comment

Choose a reason for hiding this comment

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

looks good, will be glad to have this in 👍

@dgreif dgreif merged commit 7aeb53f into main Apr 30, 2021
@dgreif dgreif deleted the action-after-close branch April 30, 2021 22:24
This was referenced Apr 30, 2021
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.

None yet

3 participants