Page MenuHomePhabricator

VisualEditor: Long lines in preformatted paragraphs should not wrap in VE
Closed, ResolvedPublic1 Estimated Story Points

Description

When a pre-formatted paragraph with long lines is displayed in VE it word wraps. However it doesn't word-wrap in display mode (T2260), meaning that you have no idea that you need to add manual line breaks until after you have saved.

See https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox3&oldid=573792519#Section_number_three (rendered) and https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox3&oldid=573792519&veaction=edit&section=2 (in VE)

The word wrapping in VE is actually better than what happens in read mode, but the two should not be different. Fixing T2260 would be better, but as it's been open since 2004 adjusting VE to match the current behaviour seems more realistic :/


Version: unspecified
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=260

Details

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:05 AM
bzimport set Reference to bz54381.

Alternatively we could fix this bug in MediaWiki…

Created attachment 17129
Preformatted text in Edit- word wrapping is present

Attached:

Created attachment 17130
Read - no word wrapping

Attached:

This comment was removed by matmarex.

We have pre.ve-ce-branchNode { white-space: pre-wrap; } added per T40043, because Chrome/Safari will otherwise also wrap the text, not just between words, but anywhere (this affects any <pre> inside a contenteditable="true" node). I did some searching and found https://bugs.webkit.org/show_bug.cgi?id=35935; it appears that we can set word-wrap: normal; to override this behavior.

We also need to remove overflow: hidden from the surface to get regular sane horizontal scrolling behavior. It doesn't seem to be necessary…

Change 205177 had a related patch set uploaded (by Bartosz Dziewoński):
Do not wrap <pre> nodes

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

Esanders set Security to None.

Change 205177 merged by jenkins-bot:
Do not wrap <pre> nodes

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