Closed Bug 1166335 Opened 10 years ago Closed 9 years ago

textarea with white-space: normal does not create a new line when return/enter key is pressed

Categories

(Core :: DOM: Editor, defect)

38 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: nik_yodo, Unassigned)

References

()

Details

(Whiteboard: [parity-chrome][parity-opera])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36 Steps to reproduce: 1. On Firefox 38.0.1, use the following markup: <textarea style="white-space: normal"></textarea> 2. Enter string for the first line, let say "line 1" 3. Press return/enter key 4. Enter string for the second line, let say "line 2" 5. Repeat steps 1 to 5 by using firefox 38.0.5 and receive the same result. Actual results: After return/enter key is pressed, it creates a space instead of going to the next line, so the result of the steps above becomes "line 1 line2" in textarea. Expected results: Tested the same scenario in chrome and it goes to the next line after return/enter key is pressed. The result comes out as follow in chrome and previous version of firefox: line 1 line 2
IE 11 — same behavior Chromium 41, Opera 29 — new line
Blocks: 82711
Component: Untriaged → Editor
Product: Firefox → Core
Whiteboard: [parity-chrome][parity-opera]
Here's the result of additional testing that I did: FF 35 - new line FF 36 - space FF 37 - space
I'm using the newest Firefox and when I press enter I just get a space. Really frustrating! Website I encounter this bug / issue / problem is www.promo-cloud.com When I used Firefox 35, enter was a new line. Firefox 36, enter was a space. Is it possible to investigate this, it's really driving me nutz that I have to use notepad every time to copy paste my feedback on music and talk to the artist(s)!
This was a purposeful behavior change. See discussion in bug 1137650 along with descriptions of what other UAs do. MISTERAMD, this is happening because the site you're using is relying on a bug that we used to have and then fixed. Now we're doing what the site asks us to do... but the site isn't asking for what it wants. Please do report the problem to them.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
And note https://code.google.com/p/chromium/issues/detail?id=453802 is the Chrome bug report for fixing this bug on their end.
On our side, we fixed the issue by simply removing the white-space property and let textarea handles the text-wrapping. That makes sense to me for most of our purpose in using textarea element. Thanks Boris for the clarification and links.
Proof of a new promo I need to give feedback to. http://imageshack.com/a/img907/2269/1ksHDt.png http://imageshack.com/a/img905/1285/igUbwn.png Text is entered on Promo Cloud using 1 enter 1 enter 1 enter 1 enter 1 enter into the textfield on Promo Cloud and than copy pasted into notepad. Result? Notepad sees <enter> as a new line, while Promo Cloud sees it as a space. And yes I'm talking to the website support of Promo Cloud. Maybe they can tell me why it is so to help answering your question Boris.
You need to log in before you can comment on or make changes to this bug.