Page MenuHomePhabricator

Switching from VisualEditor to SourceEditor on Mobile frontend causes funkyness when trying to edit different section
Closed, ResolvedPublic

Description

When I try to edit article section and I switch the editor from VisualEditor, back to SourceEditor and then exit the SourceEditor system doesn't unregister the edit action I made to start VisualEditor. Now when I try to edit any other section (because the edit icon of the section I was editing is not clickable), it opens the SourceEditor for section, and when I close the editor it reopens new editor for the first section I started editing.

Browser+OS: Debian 9.6 + Firefox 60

Steps to reproduce:

  • Open any page in mobile view, lets say https://en.m.wikipedia.org/wiki/New_York_State_Route_22
  • click edit on Section Route description
  • Only if you're in source editing mode: switch to VisualEditor
  • switch to to source editing mode
  • close the editor using the X button in left-top corner
  • try to edit the Route description section once again > First bug: It doesn't work
  • try to edit the The Bronx to Kensico Dam
  • the source editor shows up with The bronx to Kensico Dam
  • try to close the editor - Second Bug: the source editor for Route description/ becomes visible
  • try to close the editor again, it gets closed
  • try to edit the Route description - still doesn't work
  • every time you edit a section different than Route description first it opens the editor for section you want to edit, and then opens the Route description editor once again.

The problem goes away a after page refresh. Most probably switching editor from VisualEditor to SourceEditor should reset all VisualEditor-related state - otherwise closing SourceEditor doesn't reset the JS state properly.

Event Timeline

JTannerWMF triaged this task as Medium priority.Nov 20 2018, 4:09 PM
JTannerWMF moved this task from To Triage to Bug Fixes on the VisualEditor board.
matmarex subscribed.

I've been investigating something related…

Change 485975 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/MobileFrontend@master] OverlayManager: Emit overlay hide events after using #replaceCurrent

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

Change 485975 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] OverlayManager: Emit overlay hide events after using #replaceCurrent

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