-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback on "Custom Dialog on Close" #147
Comments
@bpasero, we're doing some iteration based on your feedback and @MichaelEns's feedback. We'll update our discussion. |
A couple of more notes on VSCode's usage on unload:
As for prior art: |
We have withdrawn our proposal on this problem due to the design conflict with the philosophy of keeping tab close as fast as possible. We have been exploring other alternatives including using Background Sync and Service Workers for sync'ing the app's state. However, we still see issues in sync'ing large data without loss between the document and service worker when the user closes the tab in an arbitrary moment. We'll look at this problem space again when we have a strong signal from the community. We'll make sure to re-open this issue when that happens. Thanks! |
This is an issue for https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/CustomDialogOnClose/explainer.md
With the introduction of the
dialog
property on thebeforeUnload
event I worry that now I am forced to show a dialog to the user every time on shutdown, even though I just need a bit of time to persist state. VSCode for Web can perfectly persist any state on shutdown without having to show a dialog to the user as long as it can execute a long running operation (talking about maybe50-100ms
here).I see how the browser may want to indicate some feedback to the user and may even want to put a time limit, but I think that would work with my proposal as well. For example:
event.preventDefault()
fromonBeforeUnload
handler and starts to run an async operation to persist stateSample code:
The text was updated successfully, but these errors were encountered: