Text Panel: Fixes mailto links not working (#47025)

This commit is contained in:
Joao Silva 2022-03-31 10:00:33 +01:00 committed by GitHub
parent 79769132c0
commit 0e93fe7e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,8 @@ export function interceptLinkClicks(e: MouseEvent) {
// Make sure external links are handled correctly
// That is they where seen as being absolute from app root
if (href[0] !== '/') {
// if still contains protocol it's an absolute link to another domain or web application
if (href.indexOf('://') > 0) {
// if still contains protocol or is a mailto link, it's an absolute link to another domain or web application
if (href.indexOf('://') > 0 || href.indexOf('mailto:') === 0) {
window.location.href = href;
return;
} else {