Page MenuHomePhabricator

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

Assigned To
Authored By
Quiddity
Apr 19 2015, 9:41 PM
Referenced Files
F4306809: chrome-linux-onbeforeunload.png
Jul 25 2016, 8:22 PM
F4306766: Screen Shot 2016-07-25 at 12.46.11 PM.png
Jul 25 2016, 8:14 PM
F4306739: Screen Shot 2016-07-25 at 12.00.10 PM.png
Jul 25 2016, 8:14 PM
F2925957: Снимок.JPG
Jun 2 2016, 8:26 PM
Tokens
"Like" token, awarded by Trizek-WMF."Doubloon" token, awarded by Ciencia_Al_Poder."Pterodactyl" token, awarded by Amire80."Like" token, awarded by Ltrlg.

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.

Снимок.JPG (462×814 px, 40 KB)

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

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity subscribed.
EBernhardson subscribed.

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)

Quiddity raised the priority of this task from Medium 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 set Security to None.

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.

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

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.

Screen Shot 2016-07-25 at 12.00.10 PM.png (337×723 px, 67 KB)

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

Screen Shot 2016-07-25 at 12.46.11 PM.png (299×1 px, 69 KB)

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

Screen Shot 2016-07-25 at 12.46.11 PM.png (299×1 px, 69 KB)

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

chrome-linux-onbeforeunload.png (156×470 px, 8 KB)

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.