Description
Inside <textarea>
, browsers handle whitespace:normal
differently:
Chrome silently replaces normal
with pre-wrap
. Edge used to do this too.
FF/Safari keep normal
as is.
Having normal
whitespace causes a non-WYSIWYG editing experience for the user. Spaces are not displayed as users type them, but they remain in DOM.
My opinion is that Chrome's behavior is desirable, because typing spaces and seeing nothing happen would be very confusing for the user, and the backend that receives a form with random white spacing that "looks good in the browser".
Does csswg have an opinion on what the right thing to do is?
Bugs:
Center and right justified text in textarea is not visually aligned properly.
Can't enter leading/trailing spaces in TEXTAREA with white-space:normal or nowrap