Page MenuHomePhabricator

Cursor position changes when opening/closing Realtime Preview with CodeMirror 6
Open, Needs TriagePublicBUG REPORT

Description

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

  • Edit any page with CodeMirror 6 enabled and Realtime Preview disabled.
  • Put the cursor at anywhere except the very beginning.
  • Open Realtime Preview.
  • Put the cursor at anywhere except the very beginning.
  • Close Realtime Preview.

What happens?:

The cursor moves to a different position (usually the very beginning) when opening/closing Realtime Preview.

What should have happened instead?:

The cursor position should be preserved.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Maybe related to T311684

Event Timeline

@Bhsd Are you still able to reproduce this? Everything seemed to work as expected in my testing.

@Bhsd Are you still able to reproduce this?

Yes, the cursor still jumps to the very beginning, but now I realize it only influences Safari and Firefox, and there is no problem with Chrome and Edge.