From 4a8e3ed3105769a454b56d9fe0ab570976680f9b Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 8 Jan 2019 10:57:38 -0500 Subject: [PATCH] (js) Catch exception when registering mailto --- NEWS | 1 + UI/WebServerResources/js/Mailer/Mailer.app.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index cc1d7bc18..66519cecb 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Bug fixes - [web] fixed folder export when XSRF validation is enabled (#4502) - [web] don't encode filename extension when exporting folders - [web] fixed download of HTML body parts + - [web] catch possible exception when registering mailto protocol - [core] don't always fetch the sorting columns - [eas] strip '<>' from bodyId and when forwarding mails - [eas] fix search on for Outlook application (#4605 and #4607) diff --git a/UI/WebServerResources/js/Mailer/Mailer.app.js b/UI/WebServerResources/js/Mailer/Mailer.app.js index d1e7aa14a..2790ef600 100644 --- a/UI/WebServerResources/js/Mailer/Mailer.app.js +++ b/UI/WebServerResources/js/Mailer/Mailer.app.js @@ -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) {} } }