From 3f5cb42c966b122d639820bb37f2d7d19b4552cd Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 18 Jan 2023 13:07:04 -0700 Subject: [PATCH] Fix vfsUpload didn't open mail files --- api/js/etemplate/et2_widget_vfs.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/js/etemplate/et2_widget_vfs.ts b/api/js/etemplate/et2_widget_vfs.ts index a051f82ac9..dc31f91f6b 100644 --- a/api/js/etemplate/et2_widget_vfs.ts +++ b/api/js/etemplate/et2_widget_vfs.ts @@ -904,14 +904,14 @@ export class et2_vfsUpload extends et2_file if (file_data && (typeof file_data.download_url != 'undefined')) { var fe_mime = egw.file_editor_prefered_mimes(file_data.mime); - // Check if the link entry is mime with media type, in order to open it in expose view - if (typeof file_data.mime === 'string' && - (file_data.mime.match(mime.mime_regexp,'ig') || (fe_mime && fe_mime.mime[file_data.mime]))) + // Pass off opening responsibility to the Et2VfsMime widget + if(typeof file_data.mime === 'string' && mime.isExposable()) { - vfs_attrs.onclick = function(ev) { + vfs_attrs.onclick = function(ev) + { ev.stopPropagation(); // Pass it off to the associated vfsMime widget - jQuery('img',this.parentNode.parentNode).trigger("click"); + jQuery('img', this.parentNode.parentNode).trigger("click"); return false; }; }