diff options
author | Thomas Pulzer <t.pulzer@kniel.de> | 2016-08-11 07:22:13 +0200 |
---|---|---|
committer | Thomas Pulzer <t.pulzer@kniel.de> | 2016-08-11 07:22:13 +0200 |
commit | b2b7fa485462cb460a19f0dfefbb4d7f87c841e6 (patch) | |
tree | dc4d54b9663bd10188b5ca88b8c407030c1b4151 /core | |
parent | c5033670d5d2b487b621cbc2704b33ec791a13ea (diff) | |
download | nextcloud-server-b2b7fa485462cb460a19f0dfefbb4d7f87c841e6.tar.gz nextcloud-server-b2b7fa485462cb460a19f0dfefbb4d7f87c841e6.zip |
Fixed user and main menu closing on right mouse button click.
Fixed wrong variable assignment when trying to open link in new window.
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/js/js.js b/core/js/js.js index f2301928a31..2231ba73889 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -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'); } } |