Page MenuHomePhabricator

Undo can move the cursor away from the change, obscuring what was just undone
Closed, ResolvedPublicBUG REPORT

Description

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

  • Start editing a long page
  • Turn CodeMirror on
  • Scroll to bottom (Ctrl+End)
  • Enter something
  • Do an undo (Ctrl+Z)
  • Scroll to top (Ctrl+Home)
  • Do a redo (Ctrl+Y)
  • Do an undo (Ctrl+Z)

What happens?:
The cursor goes to top (and so does the scroll view), so it's not clear what was just undone.

What should have happened instead?:
The cursor stays adjacent to the chunk that was changed, so it's clear what was just undone.

Event Timeline

Bhsd moved this task from Backlog to Improvement on the MediaWiki-extensions-CodeMirror board.
Bhsd subscribed.

This behavior is reproducible in the CodeMirror sandbox.

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

[mediawiki/extensions/CodeMirror@master] package.json: upgrade @codemirror/commands@6.10.2

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

Change #1237632 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] package.json: upgrade @codemirror/commands@6.10.2

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

Bhsd claimed this task.
Bhsd removed Bhsd as the assignee of this task.
Bhsd moved this task from Improvement to Done on the MediaWiki-extensions-CodeMirror board.