Page MenuHomePhabricator

The onBeforeUnloadHandler isn't getting set(?) when switching from VE to NWE
Closed, ResolvedPublic1 Story Points

Description

  • Load VE on a page
  • Switch to NWE
  • Make some changes
  • Click away (e.g. on the sidebar)

Expected outcome: OOUI message dialgo, "Are you sure?" / "Are you sure you want to leave editing mode without saving first?"

Worse but not-terrible outcome: Browser alert, "Do you want to leave this site?" / "Changes that you made may not be saved."

Actual outcome: No warning, browser follows link.

Switching to read mode by clicking "Read" from a changed VE, NWE, or NWE-switched-from-VE works.
Navigating away by click "Main page" from a changed VE or NWE does the latter.

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedEsanders
OpenNone
OpenNone
ResolvedJules78120
OpenNone
ResolvedDannyH
OpenNone
OpenEsanders
OpenNone
OpenEsanders
OpenNone
ResolvedDLynch

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 15 2016, 6:48 PM
Stryn added a subscriber: Stryn.Dec 15 2016, 7:23 PM
DLynch added a subscriber: DLynch.Mar 8 2017, 5:36 PM

Fun discovery! It's actually getting too set, causing an infinite loop which the browser sensibly just aborts and walks away from.

Change 341821 had a related patch set uploaded (by DLynch):
[mediawiki/extensions/VisualEditor] Switching modes created an infinite loop onBeforeUnload

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

The onBeforeUnloadHandler is getting superset when switching from VE to NWE

Change 341821 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor] Switching modes created an infinite loop onBeforeUnload

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

Jdforrester-WMF closed this task as Resolved.Mar 9 2017, 8:56 PM
Jdforrester-WMF assigned this task to DLynch.
Jdforrester-WMF removed a project: Patch-For-Review.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 9 2017, 8:56 PM