Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chrome textareas wrapping and adding line breaks

I've got a problem with textarea's in Google Chrome. I'm using classic ASP, but this is unimportant as Chrome is actually posting the data incorrectly.

The problem is with a text area. As soon as a string of text is too long to fit one line of the text area, it wraps to the next line (as it should).

My problem is that when submitted, the form data contains a CarriageReturn & LineFeed at every spot where the text wrapped, as well as user generated enter/return events - I can't even tell the difference between the two.

Does anyone know how to fix this? Possibly an option in the text area or something? All other browsers only add CarriageReturns and LineFeeds where the end user has actually put them in.

like image 486
John Avatar asked Jul 23 '09 09:07

John


1 Answers

This should only happen if you set the wrap="hard" attribute on the textarea.

Do you have wrap="hard" set on the textarea ? If so, remove it. If not, can you try setting wrap="soft" as attribute?

like image 112
Philippe Leybaert Avatar answered Oct 01 '22 11:10

Philippe Leybaert