Page MenuHomePhabricator

Preview scrolls the edit window to the top of the wikitext when using syntax highlighting
Closed, ResolvedPublic

Description

What happens:

  1. Edit a long page
  2. Scroll to the middle of the page and modify some text
  3. Click Preview
  4. Observe that in your edit window, you have been returned to the top of the page's wikitext. To get to the section that you were editing, you need to scroll or do a Find on the page.

What should happen:

  1. Edit a long page
  2. Scroll to the middle of the page and modify some text
  3. Click Preview
  4. In the edit window, you should see the wikitext that you were modifying, not the top of the wikitext.

The 2003 wikitext editor handles this situation just fine.

I was editing with the 2010 wikitext editor's syntax highlighting turned on, which may be relevant.

Event Timeline

@Jonesey95: Which web browser(s) and versions has this been tested with? Wondering if this is the same underlying issue as T254705

And does this also happen without syntax highlighting?

matmarex renamed this task from Preview scrolls the edit window to the top of the wikitext to Preview scrolls the edit window to the top of the wikitext when using syntax highlighting.Jun 15 2020, 8:12 PM
matmarex edited projects, added MediaWiki-extensions-CodeMirror; removed WikiEditor.
Bhsd subscribed.

Reopen because this will not be fixed together with T212899

Change 1005403 had a related patch set uploaded (by Bhsd; author: Bhsd):

[mediawiki/extensions/CodeMirror@master] fix scroll behavior of CodeMirror 6

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

Change 1005403 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] fix scroll behavior of CodeMirror 6

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

Bhsd moved this task from Bugs to Done on the MediaWiki-extensions-CodeMirror board.

This bug was not only relevant to Chromium. I could reproduce it using Firefox on macOS before it was fixed.