From 49762fa4dcb39c4f2c1595be44b0554ca47c3b15 Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 28 Jul 2022 14:23:36 +0200 Subject: [PATCH] fix Safari (at least 15.5) gives error link-registry not defined caused by not implemented navigator.registerProtocolHandler() --- api/js/jsapi/egw_config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/js/jsapi/egw_config.js b/api/js/jsapi/egw_config.js index 2ed4dcd50c..5a63afa5f3 100644 --- a/api/js/jsapi/egw_config.js +++ b/api/js/jsapi/egw_config.js @@ -32,7 +32,8 @@ egw.extend('config', egw.MODULE_GLOBAL, function() */ function install_mailto_handler() { - if (document.location.href.match(/(\?|&)cd=yes(&|$)/)) + if (document.location.href.match(/(\?|&)cd=yes(&|$)/) && + typeof navigator.registerProtocolHandler === 'function') // eg. Safari 15.5 does NOT implement it { let url = egw_webserverUrl; if (url[0] === '/') url = document.location.protocol+'://'+document.location.hostname+(url !== '/' ? url : '');