New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 595957 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

overflow-wrap should apply to textarea

Reported by iamcraig...@gmail.com, Mar 18 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Example URL:
https://jsfiddle.net/bcxto45r/

Steps to reproduce the problem:
1. Add `white-space: pre` style to a textarea element

What is the expected behavior?
Text will wrap automatically at width of the text area

What went wrong?
Text no longer wraps

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes In Chrome 48

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.87  Channel: stable
OS Version: OS X 10.9.5
Flash Version: Shockwave Flash 21.0 r0

I checked in Safari, Chrome, and FireFox and they all behave differently. In Chrome 48, Chrome's behavior matched Safari which seems the most correct to me. Now the text shows up on a single line.

You can apply `white-space: pre-wrap` to the textarea, and that causes it to somewhat wrap correctly, but it breaks at the question mark character in the textarea. 

See jsfiddle:

https://jsfiddle.net/bcxto45r/
 
Components: -Blink Blink>Layout

Comment 2 by e...@chromium.org, Mar 23 2016

Owner: e...@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 3 by e...@chromium.org, Mar 24 2016

Cc: tabatkins@chromium.org
Our behavior here match Firefox and the spec as I read it. pre does not wrap at all, pre-wrap does. Edge wraps at the edge (essentially using break-all breaking rules).

Tab, would you mind chiming in on this?

Comment 4 by kojii@chromium.org, Mar 28 2016

Cc: kojii@chromium.org
Per the last paragraph of <https://html.spec.whatwg.org/multipage/rendering.html#the-textarea-element-2>, UAs are expected to apply 'white-space' to <textarea>.  Per the definition of 'white-space', the "pre" value disables all non-forced linebreaks.

In 48 we apparently were violating the spec and acting like <textarea> defaulted to "overflow-wrap: break-word", too.  We're now matching the spec more closely, thus the behavior change.  Unfortunately, it looks like we *don't* actually pay attention to 'overflow-wrap' on <textarea>, so there's no way to revert to the previous behavior. :/
(The HTML spec doesn't specify that 'overflow-wrap' should apply to <textarea>, so technically we're following the spec right now.  But it's bad for authors - we should apply it, and change the spec to say that 'overflow-wrap' is also expected to be applied.)

Comment 7 by e...@chromium.org, Mar 28 2016

Cc: drott@chromium.org e...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Summary: overflow-wrap should apply to textarea (was: Textarea white-space: pre no longer wraps at the end of a line)
Thanks Tab!
This issue might be related to  issue 492202 .

Comment 9 by kojii@chromium.org, Apr 7 2016

Components: Blink>Forms>Textarea

Comment 10 by tkent@chromium.org, Jun 24 2016

Labels: Hotlist-Interop
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 26 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 12 by e...@chromium.org, Jun 26 2017

Status: Fixed (was: Untriaged)
We now match the spec and FF.

Sign in to add a comment