From a41c1fddc4b5c19d54cb1f54b2d01811e90c1570 Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 21 Nov 2023 16:47:53 +0800 Subject: [PATCH] * zin: fix click on help link not work as expected. --- www/js/zui3/zin.compatible.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/www/js/zui3/zin.compatible.js b/www/js/zui3/zin.compatible.js index 24a751a5d9..18e188f014 100644 --- a/www/js/zui3/zin.compatible.js +++ b/www/js/zui3/zin.compatible.js @@ -1076,9 +1076,14 @@ } var appCode = options.app; + console.log('> handleClickLinkIn18', {appCode, options, url}) if(url) { - if(appCode === 'help') return $.apps.openUrl(url, {app: appCode}); + if(appCode === 'help') + { + e.preventDefault(); + return $.apps.openUrl(url, {app: appCode}); + } var urlInfo = $.parseLink(url); if(urlInfo.external || (urlInfo.moduleName === 'file' && urlInfo.methodName === 'download')) return; if(urlInfo.moduleName === 'index' && urlInfo.methodName === 'index') @@ -1109,9 +1114,12 @@ if(!iframeContainer) return; var customEvent; - if(typeof Event === 'function') { + if(typeof Event === 'function') + { customEvent = new Event(event.type, {bubbles: true}); - } else { + } + else + { customEvent = document.createEvent('Event'); customEvent.initEvent(event.type, true, true); }