answered
2022-05-25 16:08:18 +0800
hawk 3250 ● 1 ● 5
http://hawkphoenix.blogsp...
I found clicking the mailto link in a PDF file still triggers a beforeunload event which removes zk desktop and stops the client engine.
Since PDF file is out of ZK control, I don't have a way to prevent it. I have 2 alternatives
open a PDF file in a separate browser tab
so clicking the mailto link doesn't affect the original page
show a confirm dialog
set the flag:
<script defer="true">
zk.confirmClose = true;
</script>
When you click the mail link (or close the browser tab), ZK will pop up a dialog to confirm the closing. If you choose cancel, then zk doesn't stop client engine.
We have given you more karma so that you can post related fiddle links or sample code. Please provide a reproducing code snippet.
jeanher ( 2022-04-25 15:54:37 +0800 )edit