W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

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

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 2 May 2011 23:21:26 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1105022307470.19153@ps20323.dreamhostps.com>
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.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 2 May 2011 16:21:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:32 UTC