(js) Catch exception when registering mailto

This commit is contained in:
Francis Lachapelle
2019-01-08 10:57:38 -05:00
parent cc9df8e24f
commit 4a8e3ed310
2 changed files with 5 additions and 1 deletions
@@ -145,7 +145,10 @@
// Try to register SOGo has an handler for mailto: links
if (navigator && navigator.registerProtocolHandler) {
var mailtoURL = window.location.origin + window.ApplicationBaseURL + 'UIxMailPopupView#!/Mail/0/INBOX/new?%s';
navigator.registerProtocolHandler('mailto', mailtoURL, 'SOGo');
try {
navigator.registerProtocolHandler('mailto', mailtoURL, 'SOGo');
}
catch (e) {}
}
}