diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2018-08-22 17:11:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-22 17:11:15 +0300 |
commit | 04a744742a06f6f274f7d61fa5d0ab3c6fa72203 (patch) | |
tree | a34e949ecd6edc37d9abf2bfe2c07b9f47ea5c27 | |
parent | bb2336f389619ea6dcd0a5fdfa82eb4f8cf28079 (diff) | |
parent | ba66cad1b46227d5a360aa688b114ad4d5cf0d4d (diff) |
Merge pull request #10787 from nextcloud/fix/10786/click-the-last-app
Fixes the app menu
-rw-r--r-- | core/css/header.scss | 3 | ||||
-rw-r--r-- | core/js/js.js | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/core/css/header.scss b/core/css/header.scss index 41ee0a63fbe..52a179cc5cb 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -441,6 +441,7 @@ nav[role='navigation'] { #appmenu { display: inline-flex; min-width: $header-height; + z-index: 2; li { position: relative; @@ -560,7 +561,7 @@ nav[role='navigation'] { } #more-apps { - z-index: 2; + z-index: 3; } } diff --git a/core/js/js.js b/core/js/js.js index 2812cba988c..a4de1c3dbf6 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -684,7 +684,12 @@ var OCP = {}, registerMenu: function($toggle, $menuEl, toggle, headerMenu) { var self = this; $menuEl.addClass('menu'); - $toggle.on('click.menu keyup.menu', function(event) { + + // On link, the enter key trigger a click event + // Only use the click to avoid two fired events + $toggle.on($toggle.prop('tagName') === 'A' + ? 'click.menu' + : 'click.menu keyup.menu', function(event) { // prevent the link event (append anchor to URL) event.preventDefault(); @@ -1452,7 +1457,7 @@ function initCore() { function setupMainMenu() { // init the more-apps menu - OC.registerMenu($('#more-apps'), $('#navigation')); + OC.registerMenu($('#more-apps > a'), $('#navigation')); // toggle the navigation var $toggle = $('#header .header-appname-container'); |