Page MenuHomePhabricator

Wrong cursor position after extension loads
Closed, ResolvedPublic


Given I have turned on syntax highlight
when I open the stone age editor
and set the cursor position
and start typing
then I expect the text to be inserted where I set the cursor

What happen is that the syntax highlight loads and then resets the cursor position at the beginning of the frame. At some point while I'm typing the inserted text will then be interrupted, the cursor position changed, and the text starts to emerge before the existing text.

Event Timeline

jeblad renamed this task from Wrong cursor position to Wrong cursor position after extension loads.Aug 30 2017, 12:35 PM

FYI, this also happens when you click to position in the textarea, before CodeMirror had the chance to load. Especially common on slower machines, or on slow connections.

We also had these kinds of problems with CodeEditor and wikEd in the past.

I'm on a fairly fast connection, but it has a noticeable latency. It could be the reason why see this bug. It is quite annoying as I must check all the time if the cursor is positioned where I expect it to be.

Change 375617 had a related patch set uploaded (by Pastakhov; owner: Pastakhov):
[mediawiki/extensions/CodeMirror@master] Fix cursor position after extension loads

Change 375617 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Fix cursor position after extension loads