rust-playground
rust-playground copied to clipboard
Feature idea: show a pop-up when closing the tab
Problem: if I write some code in the playground and I close the tab (ctrl+f4) then I lose everything.
It would be nice to have a popup warning us that we are about to close the tab.
You can check codepen.io for an example. The popup shows up if you try closing the tab after you have edited a file.
and I close the tab (ctrl+f4) then I lose everything.
This is not the default behavior:
https://github.com/integer32llc/rust-playground/blob/163af6dab05b503a8cd1e7ea994b216d665bb48c/ui/frontend/local_storage.ts#L1-L3
https://github.com/integer32llc/rust-playground/blob/163af6dab05b503a8cd1e7ea994b216d665bb48c/ui/frontend/session_storage.ts#L1-L3
Perhaps you have configured your browser to automatically discard data, in which case it seems like you would not want a pop up telling you what you already know.
I do not remember I have done such a thing.
I have tried with Chrome, Firefox and Edge (each with/without incognito mode) and I have the same problem.
This is weird.
Edit: I am on Windows 10