Fix closing when shutdown
It looks like the current skipCloseHandling
only works on Firefox
- We need to listen to the iframe's parent beforeunload
- This way we know if the user is trying to intentionally leave vs. vscode is shutting down the iframe
Screenshots
Before (on Chrome) | After |
---|---|
20221210_unload_bug | 20221210_unload_fix |
-
🎉 Notice that navigating away still works (which is whyskipCloseHandling
was introduced)
Edited by Paul Slaughter