Merge pull request #16921 from nextcloud/backport/16863/stable16-ignore-enter-key-up-event-on-menu-button-toggles
[stable16] Ignore Enter key up event on menu button toggles
This commit is contained in:
commit
85756b9348
|
@ -640,9 +640,9 @@ Object.assign(window.OC, {
|
|||
var self = this;
|
||||
$menuEl.addClass('menu');
|
||||
|
||||
// On link, the enter key trigger a click event
|
||||
// On link and button, the enter key trigger a click event
|
||||
// Only use the click to avoid two fired events
|
||||
$toggle.on($toggle.prop('tagName') === 'A'
|
||||
$toggle.on(($toggle.prop('tagName') === 'A' || $toggle.prop('tagName') === 'BUTTON')
|
||||
? 'click.menu'
|
||||
: 'click.menu keyup.menu', function(event) {
|
||||
// prevent the link event (append anchor to URL)
|
||||
|
|
Loading…
Reference in New Issue