Prevent new tab opening in tables and href="#"

This commit is contained in:
Jennifer Mourek 2019-05-23 11:04:11 +02:00
parent 26d696372f
commit 1c666d88e6
1 changed files with 2 additions and 2 deletions

View File

@ -458,7 +458,7 @@
}
// Check for ctrl or cmd click to open new tab unless clicking on a multiselect row
if ((event.ctrlKey || event.metaKey) && ! $a.parent().parent('table.multiselect').length > 0) {
if ((event.ctrlKey || event.metaKey) && ! $a.parent().parent('table').length > 0 && href !== '#') {
window.open(href, linkTarget);
return false;
}
@ -466,7 +466,7 @@
// Special checks for link clicks in action tables
if (! $a.is('tr[href]') && $a.closest('table.action').length > 0) {
// ignoray clicks to ANY link with special key pressed
// ignore clicks to ANY link with special key pressed
if ($a.closest('table.multiselect').length > 0 && (event.ctrlKey || event.metaKey || event.shiftKey)) {
return true;
}