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

Only trigger close if details was open #45

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Only trigger close if details was open #45

merged 1 commit into from
Jan 29, 2020

Conversation

muan
Copy link
Contributor

@muan muan commented Jan 29, 2020

Reference: https://github.com/github/github/pull/133881

Issue: Menu button was focused on when one of its menuitems was triggered by a hotkey without the menu being open.

Steps to reproduce:

  1. Trigger a click on a menu item without the menu being open
  2. See <summary> gets focused

This fixes the issue by returning the close() call if <details> isn't open.

before after

I didn't add a test because this would be testing that something doesn't happen which can potentially be any number of things.

cc @latentflip

@muan muan requested a review from a team January 29, 2020 16:24
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

👍

@muan muan merged commit 844dbec into master Jan 29, 2020
@muan muan deleted the close-if-open branch January 29, 2020 17:19
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.

2 participants