No horizontal scrollbar appears in a 'white-space: pre-wrap' box if overflow with space characters
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: alice0775, Unassigned)
References
Details
(Keywords: parity-chrome)
Attachments
(1 file)
330 bytes,
text/html
|
Details |
Chrome shows horizontal scrollbar.
Edge and Firefox does not show horizontal scrollbar. And keep pressing the right arrow key, caret stops at the end of line.
Reproducible : always
Steps To Reproduce:
- Open attached
Actual Results:
No horizontal scrollbar.
Keep pressing the right arrow key, caret stops at the end of line.
Expected Results:
Horizontal scroll bar appears.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
css-text-3 requires at least that the collapsible white space at the end of the line in a white-space:pre-wrap which does not overflow the container are not collapsed away. But it does allow any that would overflow to be visually collapsed, and thus (I would imagine) not contribute to the scrollable overflow of the element.
https://drafts.csswg.org/css-text-3/#white-space-phase-2 step 4
Comment 2•6 years ago
|
||
Of course we may want to avoid taking advantage of that ability to collapse the overflowing white space here.
Comment 3•5 years ago
|
||
I want to note that the Chrome behavior is very odd and should probably not be copied.
The scrollbar in chromium 73 only appears for me when there's a newline after the spaces. When there's just spaces at the end, they do not create a scrollbar, and when the spaces are followed by a letter, the letter is shown wrapped to the next line, again with no scrollbar. A newline after the letters doesn't create a scrollbar either.
The only way I can figure out how to get a scrollbar on that is with a spaces followed by a newline.
This behavior to create a scrollbar in chrome seems broken.
Sounds like firefox has good default behavior.
Implementing https://bugzilla.mozilla.org/show_bug.cgi?id=1351432 will perhaps create another reasonable behavior for textareas (I think this would make the whitespace wrap and not hang).
Comment 4•5 years ago
|
||
See also the similar use-case described in bug 1343567 (which could be handled via bug 1351432 once that is implemented, afaics).
Updated•2 years ago
|
Description
•