Page MenuHomePhabricator

Let users recover from data loss after closing tabs with unsaved changes
Open, Needs TriagePublic

Description

We had to close T207149: TwoColConflict gives no warning if closing the tab or using browser back button because the behavior we see is an intentional browser feature. TL;DR: It's impossible to warn the user about "you will loose your edit when you close this tab" when the user did not interacted with the tab before. This is not an issue with any regular edit interface, because when the user did not interacted with the tab, there was no edit made anyway. But this is different for Two-Column-Edit-Conflict-Merge: The conflict resolution screen still contains the users unsaved edit, and will be lost when closing the tab.

What we want is not blocking anything, but allowing the user to recover from this situation. For example, the unsaved edit could have been stored in localStorage. When the users goes back to the page and starts editing again, we could ask if they want to continue their previous edit.

This sounds like something that might be helpful in many situations, not only when using Two-Column-Edit-Conflict-Merge.

See also: T75241: Auto-save to increase chances of lost edits recovery