Mar 18 2020 03:17 AM
Hello, our web application requires the confirm-to-leave dialog when closing a browser window. We’ve registered onBeforeUnLoad event to our web page and it works fine. The confirm-to-leave dialog will be popped up when Click “X” icon to close the window (see image at step 3).
However, after we load and display the PDF in iFrame then Click the “X” icon (see image at step 5), the browser window will be closed without displaying the confirm-to-leave dialog. This problem does not occur with IE11. Please see our sample code in attached.
Question: How to display the confirm-to-leave dialog after loading PDF file to iFrame?
Steps to simulate the issue:
1. Unzip the attached onBeforeUnLoadIssue.zip
2. Run the MainPage.html in MS Edge
3. Click the “X” icon, the confirm-to-leave dialog will be popped up.
4. Click the “Stay” button” on the confirm-to-leave dialog.
5. Click the “My PDF” link to open the PDF file in iFrame, after the PDF file is loaded to iFrame then Click the “X” icon again.
6.The browser is closed without displaying the confirm-to-leave dialog.
Our Environment:
Windows 10, 1803 (OS Build 17134.1246)
MS Edge, Version 42.17134.1098.0
MS EdgeHTML 17.17134
Thank you.
Mar 18 2020 07:42 AM
Mar 19 2020 02:58 AM
Thank you.
Per you suggestion, our code works fine with the Chromium Engine base.
According to our organization policy, we need to stay on this legacy Edge for another while. Do you have any suggestion for a workaround while we need to stay on this legacy Edge?
Regards,
ChayankiatTI
Mar 19 2020 04:02 AM
Mar 19 2020 09:21 PM
@ChayankiatTI Thanks for reaching out!
I'll ask one of our Devs and let you know if they have any insights.
Fawkes (they/them)
Project & Community Manager - Microsoft Edge