Page MenuHomePhabricator

Warn before reload/navigation when editing text
Closed, ResolvedPublic


If I'm wriitng text in some text box, and close the tab by accident, it would be helpful to get a confirmation dialog with something like "are you sure you want to go away you'll lose text" (similar to how gmail does it), also it would be nice to have this warning whenever an ajax call is still active.

Event Timeline

skyronic raised the priority of this task from to Needs Triage.
skyronic updated the task description. (Show Details)
skyronic added a project: Phabricator.
skyronic added a subscriber: skyronic.

Can you give me a specific example of where this does not happen, and which browser you're using? This works by default for me in Safari, here's a screenshot:

Screen_Shot_2014-03-08_at_6.32.13_AM.png (1×1 px, 203 KB)

I generally dislike those javasripts that prevent me from leaving, a bit nanny-state-ish. I think it's great we auto-save instead.

Yeah, the one in the shot above is a browser native thing. I thought they all did it now but maybe they don't or we're accidentally disabling it, or the text in question was being typed into some unusual field.

@skyronic, let us know if we missed an auto-save text box somewhere.

@chad - the autosave functionality is fantastic. I think this compensates for the close tab issue, except for the corner cases of when the AJAX request to remarkup is still pending.

My internet connection is comparatively slow so I guess it's a slight issue for me, but shouldn't be a problem for most others. On a related note, I experimented a bit with the auto save and I found another minor possible bug in T4580

(Looks like Safari is the only one that does this by default.)

epriestley triaged this task as Wishlist priority.Apr 24 2014, 1:05 PM

This is messy, and contentious enough that we'd probably have to make it an option. A workaround in the meantime is to use Safari, which does this out of the box.

T4668 is a special case of this. If we do implement a navigation warning, it should also check for active uploads.

After we've been using phabricator for a while, we found the auto-save is a better approach to handling closing-browsers. We've had people who've started writing a comment and then changed their mind half way, and appreciated not getting a "are you sure you want to quit" nagging dialog.