Skip to content

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
Contributor

@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

3 participants