Merge pull request #10787 from nextcloud/fix/10786/click-the-last-app

Fixes the app menu
This commit is contained in:
John Molakvoæ 2018-08-22 16:11:15 +02:00 committed by GitHub
commit 04a744742a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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');