Page MenuHomePhabricator

Cursor off by several lines where the text is edited in new wikitext mode
Open, Needs TriagePublic


Occasionally, I encounter problems while editing in the sourcetext. My cursor would be on one line, but the edits would take effect elsewhere in the text (usually the line above/below). I attached a screenshot, where the cursor is visible, and the two opening accolades ("{{") are on the line below.

I'm using Chrome on mac, have a number of extensions active, but never encountered this until I activated the new wikitext editor in the beta functions.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 29 2018, 10:26 AM

This sounds a lot like T197592.

Very similar behavior for MacOS/Chrome in T202059 and T200741 which is closed as a duplicate of T56136.

Aklapper renamed this task from Cursor problems in new wikitext mode to Cursor off by several lines where the text is edited in new wikitext mode.Dec 29 2018, 2:44 PM
Effeietsanders added a comment.EditedDec 29 2018, 2:57 PM

For the record, I can reproduce the error consistently through currently. The error is still there if I add "&safemode=1" in the url. Let me know if there's more I can do to dig into what causes it.

It sounds a lot like T197592 indeed, but I don't see the similarity with T56136 (which predates the new wikitext editor beta?)

Schnark added a subscriber: Schnark.

For me in Firefox there is no problem with that page.
A very wild guess: It's caused by the italic formatting (like T184467 was by bold). Can you test whether the issue is fixed by adding body .cm-em { font-style: normal; } as CSS? You can do so by oping the browser console and executing mw.util.addCSS('body .cm-em {font-style:normal;}').
Apart from that, there are currently T188839: When editing source, sometimes characters get put in strange places if you have too many characters on a line (due to space collapsing), T205689: NWE+CodeMirror: Notice about unflagged revision can cause different line breaks and T203638: Different widths in NWE+CodeMirror can cause text and color to fall out of sync open.

Restricted Application added a project: Community-Tech. · View Herald TranscriptDec 31 2018, 10:07 AM
Effeietsanders added a comment.EditedDec 31 2018, 10:13 AM

@Schnark I opened the edit window I linked above, opened the browser console, executed mw.util.addCSS('body .cm-em {font-style:normal;}') and then tried to type again without reloading. That did not solve it.

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 20 2019, 9:49 AM
JTannerWMF moved this task from To Triage to Freezer on the VisualEditor board.Mar 27 2019, 6:27 PM