Skip to content

Conversation

@danxuliu
Copy link
Member

Backport of #16863

Like links, buttons generate a "click" event as well as the regular
"keydown" and "keyup" events when pressing Enter. Due to this, if both
the "click" and the "keyup" events are handled, when the menu is open
and Enter is pressed in the toggle the menu is first hidden when the
first event is handled, but then shown again when the second event is
handled. To prevent that only the "click" event should be handled when
the toggle is a button, like it is already done with links.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added bug 3. to review Waiting for reviews labels Aug 29, 2019
@danxuliu danxuliu added this to the Nextcloud 16.0.5 milestone Aug 29, 2019
@danxuliu danxuliu changed the title Ignore Enter key up event on menu button toggles [stable16] Ignore Enter key up event on menu button toggles Aug 29, 2019
@rullzer rullzer merged commit 85756b9 into stable16 Aug 29, 2019
@rullzer rullzer deleted the backport/16863/stable16-ignore-enter-key-up-event-on-menu-button-toggles branch August 29, 2019 17:15
@rullzer rullzer mentioned this pull request Sep 12, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants