Skip to content

Commit 760d4fd

Browse files
authored
Play nice with desktop keyboard modifier (#1071)
* Fixes Ctrl+click and maybe others... depends on browser Applies to #904 and post fix for PR #1062, #1065 Auto-merge
1 parent c634b3e commit 760d4fd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

views/includes/scripts/tableTrLinkScript.html

+10-5
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,20 @@
2424
return;
2525
}
2626

27-
// Check if desktop keyboard modifier(s) present
28-
if (aEv.ctrlKey || aEv.shiftKey || aEv.altKey || aEv.metaKey) {
29-
return;
30-
}
31-
3227
// Stop propagation as soon as possible
3328
aEv.stopPropagation();
3429

3530
// Redirect to the anchor href
31+
if (aEv.ctrlKey && aEv.shiftKey) {
32+
window.open(url, '_blank').focus();
33+
return;
34+
}
35+
36+
if (aEv.ctrlKey) {
37+
window.open(url, '_blank').blur();
38+
return;
39+
}
40+
3641
window.location = url;
3742
}
3843

0 commit comments

Comments
 (0)