Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Ask for confirmation before closing the page when editor is active #4893

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: Circeus
[Submitted to the original trac issue database at 1.17pm, Thursday, 4th July 2013]

Is it possible to add a quick dialogue that asks for confirmation if a page would be closed or reloaded when the editor (whether Potlatch or ID) is active? Currently the pages will close/reload silently and if the user hasn't been lucky enough to think of paranoidly saving every five mintues, all edits will be lots. This is especially bad in ID, which doesn't try to remind you to save at any point whatsoever. It is a common feature on, e.g. StackOverflow, so why not on our editors?

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 8.36pm, Monday, 8th July 2013]

Potlatch has always done this (assuming you've actually made edits). iD is even more clever in that it remembers your edits in localStorage. So edits are never lost.

(I think the exception is if you're using P2 in Opera, which doesn't allow page-close to be interrupted by dialogue boxes. But I may be wrong.)

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 11.34pm, Monday, 8th July 2013]

Richard is quite correct - this shouldn't be a problem in either editor.

@openstreetmap-trac
Copy link
Author

Author: Circeus
[Added to the original trac issue at 2.18pm, Tuesday, 9th July 2013]

THen why did I lose 2+ hours worth of editing when I accidentally hit ctrl+R? I wouldn't be submitting this bug it this didn't happen, dammit.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 2.21pm, Tuesday, 9th July 2013]

I have no idea why you lost them. What I do know is that when I try it I both get warned that I have unsaved changes and then, once I OK that, the page reloads and I get asked if I want to restore them.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 2.49pm, Tuesday, 9th July 2013]

Not sure if you were using P2 or iD, but whatever: please please please don't do two hours of work in any webapp without saving. Your OS, your browser, your power supply, and most of all, the app itself are not so stable that you might not end up losing it. P2 has a little "time you've spent editing" timer, and flashes warnings to save at five-minute intervals, for exactly that reason.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant