diff --git a/public/js/icinga/behavior/navigation.js b/public/js/icinga/behavior/navigation.js index 69386b2ee..9daae0ee7 100644 --- a/public/js/icinga/behavior/navigation.js +++ b/public/js/icinga/behavior/navigation.js @@ -95,6 +95,11 @@ var _this = event.data.self; var icinga = _this.icinga; + // Check for ctrl or cmd click to open new tab and don't unfold other menus + if (event.ctrlKey || event.metaKey) { + return false; + } + if (href.match(/#/)) { // ...it may be a menu section without a dedicated link. // Switch the active menu item: diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index d45f3d1f8..38e2667c4 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -457,6 +457,12 @@ return true; } + // Check for ctrl or cmd click to open new tab + if (event.ctrlKey || event.metaKey) { + window.open(href, linkTarget); + return false; + } + // Special checks for link clicks in action tables if (! $a.is('tr[href]') && $a.closest('table.action').length > 0) {