Explorar el Código

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

Johan Ahlen hace 8 años
padre
commit
ac6f863b1a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);