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

Ignore Enter key up event on menu button toggles #16863

Merged
merged 1 commit into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/js/dist/login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/login.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/maintenance.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/maintenance.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/src/OC/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ let currentMenuToggle = null
export const registerMenu = ($toggle, $menuEl, toggle, headerMenu) => {
$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)
Expand Down
15 changes: 5 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.