Page MenuHomePhabricator

Flow not warning me when I leave an edit page with unsaved changes
Closed, ResolvedPublic

Description

At https://www.mediawiki.org/wiki/Talk:Beta_Features/Hovercards I typed a draft, decided to discard it, and closed the tab.
There was no warning about "This page is asking you to confirm that you want to leave - data you have entered may not be saved."
My preference for this is enabled, and there should have been a warning. It was previously fixed in T60402: Flow: Flow should recognise and follow wpuseeditwarning

See also:
T72399: Flow should respect wpuseeditwarning


T96531#2404251 One important consideration is that the issue is more about not losing the content than about the desire of being warned. This means that solutions such as making draft responses more persistent may be also considered.

merged duplicate
Users are not prompted for confirmation that they will lose data , if they try to leave an active Flow edit-session (e.g., close the tab, press the back button, left-click a link, etc).

It should display a browser-warning, as it will currently do if we edit and then try to leave a standard page (try wikitext and visualeditor)

(Note: It used to work, in wikitext at least.)


merged duplicate
I write a many text in topic on the laptop and when I finish accidentally click on the link "GFDL" which is directly above the button. Once the page is refreshed - opens a new page GFDL and all typed data are lost.

There should be a check on the non-empty field.

Event Timeline

Quiddity created this task.Apr 19 2015, 9:41 PM
Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a subscriber: Quiddity.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 19 2015, 9:41 PM
EBernhardson triaged this task as Normal priority.Apr 20 2015, 5:48 PM
EBernhardson added a subscriber: EBernhardson.

This is for firefox, it was recently fixed in IE8. Check if possible to browser test this (or if we already do?)

Hmm, perhaps my browser is going insane... Now when I try to reproduce, it's even worse, because I get the warning message, but even if I click on "Stay on Page" the tab still closes.
(If I click [Esc] then just the dialog closes as it should)

Ltrlg awarded a token.Oct 11 2015, 9:44 AM
Ltrlg added a subscriber: Ltrlg.
Quiddity raised the priority of this task from Normal to High.Oct 14 2015, 5:25 PM

This is happening reproducibly in Firefox and Chromium. Raising priority, as it is very frustrating to lose partially written content.

Quiddity updated the task description. (Show Details)Oct 14 2015, 5:32 PM
Quiddity set Security to None.
Cpiral added a subscriber: Cpiral.EditedOct 16 2015, 7:47 AM

Speaking of losing an edit by "closing a window" or a tab, because you weren't warned, what if someone does not want to be warned? Must they then lose edits?

I think it is because of JavaScript that I lose unsaved edits when clicking a link on any Flow page, any Visual editor page, or any Phabricator page while editing. (Any link, even a support link in the sidebar like "user help".) So I think it would be nice to have temporary editing backup files that are auto-updated and auto-restored, for those three extensions. And it would be nice if Live preview could be saved and live through a JavaScript outage.

I use the latest Win7/Firefox and Live preview on Wikipedia.org lets me leave the page and come back to it, and it never lost an edit except for once when I turned off JavaScript in a MediaWiki.org tab. Imagine that: turning off JavaScript on one site causes me to lose edits on another site.

copying from 97292:

On mediawiki.org it currently doesn't warn you when you navigate to other pages, back and forth in the history, or close the tab, on wikitext editor neither, if you have started to write a message, and it's quite annoying.

Quiddity updated the task description. (Show Details)Nov 8 2015, 3:50 AM
He7d3r added a subscriber: He7d3r.Jun 23 2016, 11:35 AM

Tried just at the moment, on xubuntu 14.04 / Chromium 50.0.2661.102, on MediaWiki wiki.

on wikitext mode

  1. added text
  2. clicked on GFDL (no warning)
  3. click on back button
  4. no text

on VE mode

  1. added text
  2. clicked on GFDL (no warning)
  3. click on back button
  4. no text

One important consideration is that the issue is more about not losing the content than about the desire of being warned. This means that solutions such as making draft responses more persistent may be also considered.

Change 296276 had a related patch set uploaded (by Catrope):
Show a warning when leaving a page with unsaved text in an editor

https://gerrit.wikimedia.org/r/296276

Etonkovidova added a comment.EditedJul 25 2016, 8:14 PM

Checked in betalabs (1.28.0-alpha (a3f4508) the cases that were mentioned on the ticket
A user types some text as a Flow board post (VE and wikitext mode were checked) and then clicks

  • 'Cancel' button
  • close tab
  • the browser Back button
  • search for some pages
  • clicking on links on a page
  • clicking on Logout

A warning will appear in all above cases.
@Catrope: However, instead of the browser warning such 'Confirm navigation...' e.g.

Chrome (Version 50.0.2661 and 4) and IE11 display reduced text. FF and Safari seem to be ok.

Chrome only (Version 50.0.2661.) displays reduced text. FF and Safari seem to be ok.

Ugh, it would be nice if Chrome behaved the same on different OSes -_- . I see this on Linux:

Will fix.

Change 300993 had a related patch set uploaded (by Catrope):
Follow-up 782bbdf: don't show "are you sure you want to leave?" dialogs with "false"

https://gerrit.wikimedia.org/r/300993

Change 300993 merged by jenkins-bot:
Follow-up 782bbdf: don't show "are you sure you want to leave?" dialogs with "false"

https://gerrit.wikimedia.org/r/300993

Change 301013 had a related patch set uploaded (by Catrope):
Follow-up 782bbdf: unbind beforeunload handler on save

https://gerrit.wikimedia.org/r/301013

Change 301013 merged by jenkins-bot:
Follow-up 782bbdf: unbind beforeunload handler on save

https://gerrit.wikimedia.org/r/301013

Checked in betalabs 1.28.0-alpha (2581614).
The content in the browser warning is fully displayed in all browsers; after saving the content, there is no additional warnings appear when a user navigates from the page.

jmatazzoni closed this task as Resolved.Jul 27 2016, 5:46 PM