Browse Source

HUE-6307 [frontend] Add middle click support for opening hue links in a new page

Johan Ahlen 8 years ago
parent
commit
ac6f863b1a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -85,7 +85,7 @@
         ko.bindingHandlers.click.init(element, function() {
           return function (data, event) {
             var url = ko.unwrap(valueAccessor());
-            if (event.ctrlKey || event.metaKey) {
+            if (event.ctrlKey || event.metaKey || event.which === 2) {
               window.open('/hue' + (url.indexOf('/') === 0 ? url : '/' + url), '_blank');
             } else {
               huePubSub.publish('open.link', url);