Page MenuHomePhabricator

source editor on chrome: hitting "previous/back" browser button after "Show Preview/Show Changes" annihilates the changes without warning
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
version I

  • use google chrome (reproduced with both linux and windows latest version)
  • if "2017 wikitext editor" is enabled, disable it (i am not familiar with 2017, never used it. it may or may not exhibit similar issue)
  • open a page in source editor
  • add "bla" before the first line and "bla bla" after the last (or any other easy to detect change)
  • hit "Show Preview"
  • hit the "Back" button of the browser

version II:

  • same as version I, except replacing "show preview" with "show changes"

What happens?:
the page goes back to "edit source" screen, with source of original page, and all the edit changes made prior to clicking "show preview/changes" are gone

What should have happened instead?:

the TextArea editor should have retained the changes (this is current behavior with firefox)

the very least, a warning should have been shown. similar to the behavior when hitting "back" from the source editor without executing preview or show changes.

General comments

  • possibly, likely even, this report is a dupe. i tried to find similar report and failed
  • IMO, this is a show-stopper, and should be fixed before next version is released
  • i do not have access to sites running older version of mw, so i cannot say if this behavior was always like this (i will be mightily surprised to hear that), and if not, when it appeared.
  • i had difficulties selecting "Tags". i hope "EditNotify" is the right one. please correct it if there is more suitable project.

peace

Event Timeline

Kipod renamed this task from source editor: hitting "previous/back" browser button after "Show Preview/Show Changes" or annihilates the changes without warning to source editor: hitting "previous/back" browser button after "Show Preview/Show Changes" annihilates the changes without warning.Jan 4 2024, 8:39 PM
Yaron_Koren subscribed.

The EditNotify extension is definitely not the right tag for this issue - that's an extension, while this seems to be an issue for core MediaWiki. I'm not sure if I picked the right tag to change it to, but it's hopefully closer to the mark.

Which source editor? See https://www.mediawiki.org/wiki/Editor

edited the description. hope it answers the question.

TBH, i could only find a single source editor on the page linked (with or without the 2010 toolbar - the issue is there either way, and regardless of ACE for code editing - thie issue is there too), ignoring stuff like WikED or mobile (which does not even have "show preview").
anything else on this page does not look like source editor - at most it's some "source like" behavior of visual editor....
did you have any issue replicating? it should take but 27 seconds. do you agree that this is a bug? do you agree it's a showstopper?

ALSO: @Aklapper , i originally assigned wrong tag to this story, which Yaron replaced with a different one, and it seems that ATM there is no tag at all. can you please assign the correct tag?

peace.

I get a warning in both Firefox and Chrome when I press back. The only way I can get no warning is if I press back very quickly after the preview loads.

I get a warning in both Firefox and Chrome when I press back. The only way I can get no warning is if I press back very quickly after the preview loads.

hmmm... when i saw this i immediately suspected the issue reported is related to something specific to my account (preferences, gadgets, scripts and so on), so i tried again as anon, outside the account.
i still see this behavior. tested as anon on hebrew, english, and dutch (nl) wikipedias, using chrome.

i then i repeated the experiment with firefox, and this time, even though there was no warning, none was warranted: the changes made were retained after hitting "back". i will update the story and add chrome to the reproduction instructions and the synopsis. my bad not doing it off the bat.

trivia:
in one case (anon, chrome, enwiki) i did get a warning when trying to entirely back out of source edit (after executing the steps), but it was a straw warning: by this time (i.e., after backing out of "show preview" with no warning), the actual changes i made before "show preview" were already gone.

peace.

Kipod renamed this task from source editor: hitting "previous/back" browser button after "Show Preview/Show Changes" annihilates the changes without warning to source editor on chrome: hitting "previous/back" browser button after "Show Preview/Show Changes" annihilates the changes without warning.Jan 5 2024, 4:46 PM
Kipod updated the task description. (Show Details)