Skip to content

Fix closing when shutdown

Paul Slaughter requested to merge ps-fix-beforeunload-skip-close into main

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 why skipCloseHandling was introduced)
Edited by Paul Slaughter

Merge request reports

Loading