[whatwg] textarea newline format - raw value vs. transformed value and setSelectionRange

Michael A. Puls II shadow2531 at gmail.com
Mon May 2 22:49:18 PDT 2011


On Mon, 02 May 2011 19:21:26 -0400, Ian Hickson <ian at hixie.ch> wrote:

> On Tue, 4 Jan 2011, Michael A. Puls II wrote:
>>
>> But, what happens when pressing ENTER in a textarea? Should it always
>> create a \n in the raw value? What if you paste content that has "Line
>> 1\r\nLine 2" in an empty textarea area? Will the raw value contain "Line
>> 1\nLine 2" then?
>
> I've clarified the spec to indicate explicitly that U+000A is what should
> be inserted for a line break when the user edits the page. The behaviour
> when the user pastes a U+000D into a textarea is up to the UA, but could
> include inserting the U+000D.

Thanks

-- 
Michael



More information about the whatwg mailing list