Mark all as read

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

"Are you sure?" popup when closing a page


When I close a window while writing an answer, it closes immediately without any popup.

This has resulted in me losing a few answers while writing them midway.

The feature I'm asking for is an "Are you sure you want to close/navigate off this page?" popup whenever there's text in an answer field.

Why should this post be closed?


Does the (IMO rather overzealous) autosave not work for you? Canina‭ 10 days ago

Web browsers often handle this or can get configured to handle it. Lundin‭ 10 days ago

Ok, I'll check out how to configure my browser. Razetime‭ 10 days ago

We don't need more nannyware. Olin Lathrop‭ 10 days ago

This isn't "configure the web browser". Probably could be done strictly in the browser by an extension which would be supremely annoying. Normally it is done by a drop of Javascript as part of the page. Trivial to add. Useful to the 50% of users who it helps. Annoying to the 50% of users who can't stand it. I am more often in the "can't stand it" side, though not always. manassehkatz‭ 10 days ago

Show 4 more comments

1 answer


I accidentally closed a tab with a question and lost some changes so I do feel your pain.

However, if we are going to fire an event on window exit I would much rather it be saving the draft in its current state.

That would avoid the popup and save your answer which should solve the problem.


+1, Yes, this makes a lot of sense. Razetime‭ 9 days ago

How did the auto-save not work for you? At least with the browser I use (Edge on Win10), it seems to save within a second or two of making a change. That means I can't lose more than a couple seconds of work if I suddenly closed the window by mistake. What happened in your case to defeat this mechanism? Olin Lathrop‭ 8 days ago

Sign up to answer this question »