Skip to content

Commit 04a7447

Browse files
authored
Merge pull request #10787 from nextcloud/fix/10786/click-the-last-app
Fixes the app menu
2 parents bb2336f + ba66cad commit 04a7447

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

core/css/header.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ nav[role='navigation'] {
441441
#appmenu {
442442
display: inline-flex;
443443
min-width: $header-height;
444+
z-index: 2;
444445

445446
li {
446447
position: relative;
@@ -560,7 +561,7 @@ nav[role='navigation'] {
560561
}
561562

562563
#more-apps {
563-
z-index: 2;
564+
z-index: 3;
564565
}
565566
}
566567

core/js/js.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,12 @@ var OCP = {},
684684
registerMenu: function($toggle, $menuEl, toggle, headerMenu) {
685685
var self = this;
686686
$menuEl.addClass('menu');
687-
$toggle.on('click.menu keyup.menu', function(event) {
687+
688+
// On link, the enter key trigger a click event
689+
// Only use the click to avoid two fired events
690+
$toggle.on($toggle.prop('tagName') === 'A'
691+
? 'click.menu'
692+
: 'click.menu keyup.menu', function(event) {
688693
// prevent the link event (append anchor to URL)
689694
event.preventDefault();
690695

@@ -1452,7 +1457,7 @@ function initCore() {
14521457
function setupMainMenu() {
14531458

14541459
// init the more-apps menu
1455-
OC.registerMenu($('#more-apps'), $('#navigation'));
1460+
OC.registerMenu($('#more-apps > a'), $('#navigation'));
14561461

14571462
// toggle the navigation
14581463
var $toggle = $('#header .header-appname-container');

0 commit comments

Comments
 (0)