Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics

Dashboard
Notifications
Mark all as read
Q&A

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

+3
−2

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 does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

9 comments

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

Web browsers often handle this or can get configured to handle it. Lundin‭ 2 months ago

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

We don't need more nannyware. Olin Lathrop‭ 2 months 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‭ 2 months ago

Show 4 more comments

1 answer

+3
−0

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.

Why does this post require moderator attention?
You might want to add some details to your flag.

2 comments

+1, Yes, this makes a lot of sense. Razetime‭ 2 months 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‭ 2 months ago

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!