Page MenuHomePhabricator

"Wikitext syntax highlighting" feature asks the user "confirm that you want to leave" after clicking on the text and not making changes
Closed, ResolvedPublic5 Estimated Story Points

Description

When I hit "edit" and then "back" - it goes back without asking.
But when I hit "edit", click with the mouse on the text, and then hit "back", it asks: "This page is asking you to confirm that you want to leave - data you have entered may not be saved.", as if I changed something.

It falsely detects the change when there is no change.

firefox-55.0.1

See also: (April 2015) T95150: CodeMirror should not ask confirmation when user leaves page that has no changes

Event Timeline

Yeah. This is somewhat annoying. When there is no change, then the editor should close without asking, as is the case without using CodeMIrror. Confirming this bug for Firefox+OWE.

I am doubtful that this is being caused by Wikitext Syntax Highlighting feature. Are you sure this doesn't happen without it being enabled?
Can you check on a different browser?

I am doubtful that this is being caused by Wikitext Syntax Highlighting feature. Are you sure this doesn't happen without it being enabled?
Can you check on a different browser?

With Syntax Highlighting disabled, the editor closes immediately without confirmation dialog as expected (Firefox).

Tried with the Google Chrome - the same result.

FYI: I am not hitting "back" button, I am hitting the "Článek" (= Article/Page) bookmark on top of the page for the new load of the page in question.

Are you sure this doesn't happen without it being enabled?

Positive.

I can confirm this. If you don't click in the text, then you only get the "are you sure" warning when you hit Article or Talk. If you click in the text, you get the warning in all situations (back button, close the tab, Article, Talk).

This only happens with syntax highlighting, doesn't happen without it.

kaldari set the point value for this task to 5.Nov 1 2017, 11:24 PM
Niharika triaged this task as Medium priority.Nov 7 2017, 11:21 PM
DannyH renamed this task from "Wikitext syntax highlighting" feature asks the user if he "want to leave" after he only clicks on the text and tries to go back to "Wikitext syntax highlighting" feature asks the user "confirm that you want to leave" after clicking on the text and not making changes.Nov 27 2017, 10:15 PM

Change 397631 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/CodeMirror@master] Fix content changed checks on unload

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