Page MenuHomePhabricator

SET: Switching to VE from Wikitext editor does not work in case of discarding the changes if user is prefer-wt
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Open Wikitext editor to edit a page or try to add a new section with it

2.Click on the pencil icon to switch to VE or Click on the Edit tab from the toolbar
3.Click on "Discard Changes

  1. When you get the dialog with prompt "This page is asking you to confirm that you want to leave - data you have entered may not be saved." Click on "Leave page"

Observed Result:
It does not switch to VE , just reloads the wiki text editor again

Event Timeline

Jdforrester-WMF renamed this task from Switching to VE from Wikitext editor does not work in case of discarding the changes to SET: Switching to VE from Wikitext editor does not work in case of discarding the changes .Feb 29 2016, 7:59 PM
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

We should also bypass the wikitext editor's onBeforeUnload handler; two prompts rather than one isn't great.

(Well, worked for me as stated... I added an extra step to the process - changing my SET preference to prefer-wt - and now I see a problem)

Change 274019 had a related patch set uploaded (by Alex Monk):
Fix WTE->VE switching in prefer-wt SET mode

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

Jdforrester-WMF renamed this task from SET: Switching to VE from Wikitext editor does not work in case of discarding the changes to SET: Switching to VE from Wikitext editor does not work in case of discarding the changes if user is prefer-wt.Mar 1 2016, 12:34 AM
Jdforrester-WMF triaged this task as High priority.

Change 274019 merged by jenkins-bot:
Fix WTE->VE switching in prefer-wt SET mode

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

This is now working fine for the above mentioned scenario but I am still seeing that when I try to switch to VE from WTE without making any edit, it reloads WTE instead of switching. My preference is: Show me both Editors. Happens while trying to switch via Edit tab or pencil icon

Separate issue?

This is now working fine for the above mentioned scenario but I am still seeing that when I try to switch to VE from WTE without making any edit, it reloads WTE instead of switching. My preference is: Show me both Editors. Happens while trying to switch via Edit tab or pencil icon

Separate issue?

Yeah, sounds it. Odd.

That works for me in beta enwiki...