From e0f29cadaf1726b57b9fc045b0229d48b5898e88 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Tue, 21 Aug 2018 21:47:04 +0200 Subject: [PATCH 1/2] Fixes the app menu Signed-off-by: Michael Weimann --- core/css/header.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/css/header.scss b/core/css/header.scss index 41ee0a63fbe15..52a179cc5cb0a 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; } } From ba66cad1b46227d5a360aa688b114ad4d5cf0d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Wed, 22 Aug 2018 09:47:00 +0200 Subject: [PATCH 2/2] Fix keyboard menu element event detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/js/js.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/js/js.js b/core/js/js.js index 2812cba988c12..a4de1c3dbf684 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');