Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4893 closed enhancement (invalid)

Ask for confirmation before closing the page when editor is active

Reported by: Circeus Owned by: rails-dev@…
Priority: minor Milestone:
Component: website Version:
Keywords: Cc:

Description

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?

Change History (5)

comment:1 Changed 6 years ago by Richard

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.)

comment:2 Changed 6 years ago by Tom Hughes

Resolution: invalid
Status: newclosed

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

comment:3 Changed 6 years ago by Circeus

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.

comment:4 Changed 6 years ago by Tom Hughes

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.

comment:5 Changed 6 years ago by Richard

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.

Note: See TracTickets for help on using tickets.