[Bug 13983] WF2: It seems like textarea's raw value should always normalize newlines to \n

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13983

--- Comment #9 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-10-27 23:54:02 UTC ---
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1240

Opera:
 - value is raw value normalised to \r\n
 - setting value sets raw value (implied)
 - textLength is based on raw value normalised to \r\n
 - textContent is not normalised

Chrome:
 - value is raw value normalised to \n
 - setting value sets raw value (implied)
 - textLength is based on raw value normalised to \n
 - textContent is not normalised

Firefox:
 - value is raw value not normalised
 - setting value normalises to \n
 - textLength is based on raw value not normalised
 - textContent is not normalised

IE9:
 - value is raw value not normalised but with \rs turned into \n
 - setting value normalises to \n
 - no textLength support
 - textContent is normalised to \n

So from this I think it would be reasonable to say:
 - value should be raw value normalised to \r\n (what is submitted)
 - setting value can set raw value (since getting it is normalised
   so it doesn't matter what the raw value really is)
 - textLength should be based on the raw value normalised to \r\n
   (again, what is submitted)
 - textContent should not be normalised (since that's a far broader
   change than just <textarea> if we do it)

I believe this is what the spec says now.

Are there any Web-compat reasons to do something else?

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 27 October 2011 23:54:09 UTC