List views: handle clicks on mailto: and http:// links as expected

refs #11267
This commit is contained in:
Alexander A. Klimov 2016-06-02 10:43:34 +02:00
parent 188703cf95
commit 4a78fa6a66

View File

@ -420,8 +420,8 @@
var linkTarget = $a.attr('target');
var $target;
var formerUrl;
var remote = /^(?:[a-z]+:)\/\//;
if (href.match(/^(mailto|javascript|data):/)) {
if (href.match(/^(?:(?:mailto|javascript|data):|[a-z]+:\/\/)/)) {
event.stopPropagation();
return true;
}
@ -439,10 +439,6 @@
}
}
// Let remote links pass through
if (href.match(remote)) {
return true;
}
// window.open is used as return true; didn't work reliable
if (linkTarget === '_blank' || linkTarget === '_self') {
window.open(href, linkTarget);