From 5cf1534a089db0e7b4ca0bfc16ff9e68b0ff0cf6 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 8 Aug 2015 11:46:59 +0000 Subject: [PATCH] fhemweb.js: Open link only in new tab if shift/ctrl/etc is pressed git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9028 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- www/pgm2/fhemweb.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/pgm2/fhemweb.js b/www/pgm2/fhemweb.js index 965010091..82526ec68 100644 --- a/www/pgm2/fhemweb.js +++ b/www/pgm2/fhemweb.js @@ -354,7 +354,9 @@ FW_replaceLink(el) if(ma == null || ma.length == 0 || !ma[2].match(/=(save|set)/)) { ma = attr.match(new RegExp("^"+FW_root)); // Avoid "Connection lost" @iOS if(ma) { - $(el).click(function() { + $(el).click(function(e) { + if(e.shiftKey || e.ctrlKey || e.metaKey) // Open link in window/tab + return; FW_leaving = 1; if($(el).attr("target") == "_blank") { window.open(url, '_blank').focus();