Page MenuHomePhabricator

[NWE + CodeMirror] Long words cause following text to fall out of sync
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  1. Edit in NWE with syntaxhighlighting enabled.
  2. Create a paragraph with a word longer than one line.
  3. Try to edit the following text.

Expected: Nothing noticeable should happen.
Actual: You actually edit one line apart from what is shown, this also applies to spelling errors marked by your browser.

syntaxhighlight.png (317×1 px, 42 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The lines thing shouldn't be an issue as both inputs have the same CSS, but they could've got out of sync for another reason. Can you test again on beta labs after https://gerrit.wikimedia.org/r/#/c/363644/ is merged?

Still happens. I can't find the relevant CSS properties, but in the screenshot you can see that the wavy underline for the long word is not broken, while the word is. So I think that at least Firefox has word-break: break-all on the visible content, but word-break: normal on the real.

Executing mw.util.addCSS('*{word-break: break-all !important}') in the console fixes the issue (normal doesn't, but anyway I think break-all is better), so you just have to figure out, which element should get that CSS.

Change 364100 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Fix word wrapping CSS in source mode

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

Change 364100 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Fix word wrapping CSS in source mode

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

Change 364229 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b76c9699b)

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

Change 364229 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b76c9699b)

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

Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.