diff --git a/api/js/etemplate/Et2Url/Et2UrlEmail.ts b/api/js/etemplate/Et2Url/Et2UrlEmail.ts index c95e538327..6968b76004 100644 --- a/api/js/etemplate/Et2Url/Et2UrlEmail.ts +++ b/api/js/etemplate/Et2Url/Et2UrlEmail.ts @@ -49,7 +49,7 @@ export class Et2UrlEmail extends Et2InvokerMixin(Et2Textbox) static action(value) { - if (egw.user('apps').mail && egw.preference('force_mailto','addressbook') != '1' ) + if (value && egw.user('apps').mail && egw.preference('force_mailto','addressbook') != '1' ) { egw.open_link('mailto:'+value); } diff --git a/api/js/etemplate/Et2Url/Et2UrlPhone.ts b/api/js/etemplate/Et2Url/Et2UrlPhone.ts index fe34bf0056..ccdacb6e54 100644 --- a/api/js/etemplate/Et2Url/Et2UrlPhone.ts +++ b/api/js/etemplate/Et2Url/Et2UrlPhone.ts @@ -51,6 +51,8 @@ export class Et2UrlPhone extends Et2InvokerMixin(Et2Textbox) // remove everything but numbers and plus, as telephon software might not like it value = value.replace(/[^0-9+]/g, ''); + if (!value) return; // don't try to dial an empty number + // mobile Webkit (iPhone, Android) have precedence over server configuration! if (navigator.userAgent.indexOf('AppleWebKit') !== -1 && (navigator.userAgent.indexOf("iPhone") !== -1 || navigator.userAgent.indexOf("Android") !== -1))