Lurker News

Comments (319) 80 threads

Show all comments

Showing thread 7 of 80

sgbeal1 reply#
It's all fun and games until we reflexively hit ctrl-w to close a virtual window and end up closing the browser tab that window is running in :/.
diggan1 reply#
Definitely a `window.onbeforeunload = () => "Are you sure you want to close this browser tab"` missing, or override the keyboard input completely, so it doesn't try to close the tab.

Same problem exists for all browser shortcuts inside the OS.

stretch07#
> window.onbeforeunload = () => "Are you sure you want to close this browser tab"

besides the fact that now all browsers just display the uninformative "Your unsaved data may be lost" rather than any custom message, this would be a perfect addition.