mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Fixed user and main menu closing on right mouse button click.
Fixed wrong variable assignment when trying to open link in new window.
This commit is contained in:
parent
c5033670d5
commit
b2b7fa4854
1 changed files with 8 additions and 7 deletions
|
|
@ -1509,12 +1509,13 @@ function initCore() {
|
|||
if(event.which === 1 && !event.ctrlKey && !event.metaKey) {
|
||||
$app.addClass('app-loading');
|
||||
} else {
|
||||
// Close navigation when opening app in
|
||||
// a new tab
|
||||
OC.hideMenus();
|
||||
// On middle click or on first button click with ctrl key or meta key hold
|
||||
console.log(event.which);
|
||||
if(event.which === 2 || (event.which === 1 && (event.ctrlKey || event.metaKey))) {
|
||||
window.open($page, '_blank');
|
||||
// Close navigation when opening app in
|
||||
// a new tab
|
||||
OC.hideMenus();
|
||||
window.open($app, '_blank');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1534,11 +1535,11 @@ function initCore() {
|
|||
$page.find('div').remove(); // prevent odd double-clicks
|
||||
$page.prepend($('<div/>').addClass('icon-loading-small-dark'));
|
||||
} else {
|
||||
// Close navigation when opening menu entry in
|
||||
// a new tab
|
||||
OC.hideMenus();
|
||||
// On middle click or on first button click with ctrl key or meta key hold
|
||||
if(event.which === 2 || (event.which === 1 && (event.ctrlKey || event.metaKey))) {
|
||||
// Close navigation when opening menu entry in
|
||||
// a new tab
|
||||
OC.hideMenus();
|
||||
window.open($page, '_blank');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue