Page MenuHomePhabricator

Mobile editor updates browser URL incorrectly if you click back with unsaved edits
Closed, ResolvedPublic5 Estimated Story Points

Description

  • Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain
  • Visit a page and click edit
  • Type some text in the textarea
  • Click the close icon in the top left corner
  • Confirmation message appears. Click continue editing
  • Confirm you stay in the overlay, the URL remains #/editor/0
  • Type text in textarea
  • Press browser back button
  • Confirm you stay in the overlay

Expected: the URL remains #/editor/0
Actual: the URL becomes #/

Developer notes

This was flagged during QA of T218173 and can be fixed by making the editor overlay use the new onBeforeExit callback parameter.

Event Timeline

Change 493756 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Editor and VisualEditor use onBeforeExit

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

ovasileva triaged this task as Medium priority.Mar 21 2019, 9:44 AM

Change 493756 abandoned by Jdlrobson:
Editor and VisualEditor use onBeforeExit

Reason:
Will work on later

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

ovasileva set the point value for this task to 5.Mar 27 2019, 4:52 PM

Change 493756 restored by Jdlrobson:
Editor and VisualEditor use onBeforeExit

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

Change 493756 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] 🐛 Fix back button behaviour in editor

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

Jdlrobson claimed this task.

Back button behaviour is fixed now thanks to https://phabricator.wikimedia.org/T218809#5141181.