Page MenuHomePhabricator

Mobile: After switching from wikitext to visual and to wikitext again, page URL is not updated (causes the editor to not open again)
Closed, ResolvedPublic

Description

  1. On a mobile (or in the Chrome browser mobile simulator) open an article for editing. If an article opens in VE mode, switch to wikitext mode and leave the article to make wikitext mode default.
  2. Switch to VE mode (this causes UI issues described in T214302)
  3. Switch to the wikitext mode again and leave the editor using the "X" close button in top-left corner - without any edits. Clicking to start editing (click on the pencil button) will not open the editor again - the page needs to be reloaded. (Leaving the editor using the browser back button does not cause this problem.)

Event Timeline

phuedx triaged this task as High priority.Jan 17 2019, 3:09 PM
phuedx edited projects, added MinervaNeue; removed MobileFrontend.
phuedx moved this task from Needs triage to MinervaNeue on the Mobile board.
phuedx added subscribers: ovasileva, phuedx.

This seems High priority to me, @ovasileva. It also seems like a regression, right?

Agree with high priority. Tagging with our backlog so we can discuss how to triage properly

Jdlrobson added a subscriber: Esanders.

I believe this falls under the editing team, since the button is created by VisualEditor. @Esanders please correct me if I'm wrong

  1. On a mobile (or in the Chrome browser mobile simulator) open an article for editing. If an article opens in VE mode, switch to wikitext mode and leave the article to make wikitext mode default.
  2. Switch to VE mode - the toolbar disappears (the double gray line will be displayed). Clicking on the editor options will display jumbled menu options:

F27904402 F27904405

Looks like Ed has filed a separate task that covers these two issues: T214302: Appearance broken when switching from source to VE on mobile. And he also fixed them – both problems are fixed on master. I don't know if he found the issue independently, or read your comment here and forgot about the task ;)

  1. Switch to the wikitext mode again and leave the article - without any edits.

Clicking to start editing (click on the pencil button) will not open editor - the page needs to be reloaded.

This, however, is still a problem.

It seems like the URL is not updated to remove #/editor/0 from it after the editor is closed, and that is why clicking the pencil again does nothing (because you're already at the URL it would navigate to). This also causes funny issues with back/forward navigation.

I'm going to rephrase this task to cover just this issue.

Thanks @matmarex as always for your thoroughness!!

matmarex edited projects, added VisualEditor (Current work); removed VisualEditor.

I did not rephrase the task yet because I got distracted by trying to debug it ;)

matmarex renamed this task from Issues with switching between editors when wikitext editor is default to Mobile: After switching from wikitext to visual and to wikitext again, page URL is not updated (causes the editor to not open again).Jan 22 2019, 11:30 PM
matmarex updated the task description. (Show Details)

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

@Jdlrobson I'd appreciate review from you or other Reading folks, I think the bug is in OverlayManager, and y'all are more familiar with it.

I'm not sure if this is related, but in T213120 I made the page navigate to the read URL (with a section fragment if required), instead of calling history.back(). The latter seems fragile and problematic, and could be an issue here too?

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

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

This issue is fixed, but there is a new regression:T215367 which seems to be relevant to this.