Open Bug 1532520 Opened 6 years ago Updated 2 years ago

No horizontal scrollbar appears in a 'white-space: pre-wrap' box if overflow with space characters

Categories

(Core :: Layout: Text and Fonts, defect, P3)

x86_64
Windows 10
defect

Tracking

()

Tracking Status
firefox-esr60 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- affected

People

(Reporter: alice0775, Unassigned)

References

Details

(Keywords: parity-chrome)

Attachments

(1 file)

Attached file textarea1.html

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:

  1. 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.

Blocks: 1008019
Component: Layout: Form Controls → Layout: Text and Fonts
Summary: No horizontal scrollbar appears in <textarea> if overflow with space characters → No horizontal scrollbar appears in a 'white-space: pre-wrap' box if overflow with space characters

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

Priority: -- → P3

Of course we may want to avoid taking advantage of that ability to collapse the overflowing white space here.

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).

See also the similar use-case described in bug 1343567 (which could be handled via bug 1351432 once that is implemented, afaics).

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: