Wrong cursor position after extension loads
Closed, ResolvedPublic

Description

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.

jeblad created this task.Aug 30 2017, 12:35 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 30 2017, 12:35 PM
jeblad renamed this task from Wrong cursor position to Wrong cursor position after extension loads.Aug 30 2017, 12:35 PM
TheDJ added a subscriber: TheDJ.Sep 1 2017, 9:36 AM

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.

jeblad added a comment.Sep 1 2017, 7:48 PM

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

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

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

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

kaldari closed this task as Resolved.Oct 6 2017, 5:32 AM
Restricted Application added a project: Community-Tech. · View Herald TranscriptThu, Jan 4, 6:10 AM
kaldari moved this task from Untriaged to Archive on the Community-Tech board.Tue, Jan 9, 12:39 AM