diff --git a/api/js/jsapi/egw.js b/api/js/jsapi/egw.js index f16b177615..8f62fbfc66 100644 --- a/api/js/jsapi/egw.js +++ b/api/js/jsapi/egw.js @@ -439,10 +439,13 @@ ); } - // register our mail as mailto protocol handler - let url = egw_webserverUrl; - if (url[0] === '/') url = document.location.protocol+'://'+document.location.hostname+(url !== '/' ? url : ''); - navigator.registerProtocolHandler('mailto', url+'/index.php?menuaction=mail.mail_compose.compose&preset[mailto]=%s', 'Mail'); + // register our mail as mailto protocol handler (only for main-page, FF seems to pop it up constantly, if we do so in an iframe) + if (location.href.match(/(\?|&)cd=yes(&|$)/)) + { + let url = egw_webserverUrl; + if (url[0] === '/') url = document.location.protocol+'://'+document.location.hostname+(url !== '/' ? url : ''); + navigator.registerProtocolHandler('mailto', url+'/index.php?menuaction=mail.mail_compose.compose&preset[mailto]=%s', 'Mail'); + } } catch(e) { // ignore SecurityError exception if top is different security context / cross-origin