Bug 90206 - Pasting of first newline into text area does not appear to work
Summary: Pasting of first newline into text area does not appear to work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-06-28 14:16 PDT by Joshua Lock (joshuagl)
Modified: 2022-11-30 16:46 PST (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock (joshuagl) 2012-06-28 14:16:47 PDT
The first newline pasted into a an empty textarea isn't rendered.

Reproduced on: Safari 5.1.7 (Win), Chrome 20.0.1132.43 (Linux) and Chromium r144706.

Reproduction steps: Paste exactly one newline in an empty textarea. The first paste results in nothing.

Expected result: cursor on second line with new line inserted.

Actual result: cursor on first line.

Additional details: A second (and any following) pasted newline results in a newline being inserted.
Firefox 13 IE 9 and Opera 12.00 each work as expected.

From http://crbug.com/121627
Comment 1 Joshua Lock (joshuagl) 2012-06-28 14:17:30 PDT
I'd like to work on this, if someone with edit bugs would assign to me I'd appreciate it.
Comment 2 Marijn Haverbeke 2013-04-29 01:08:09 PDT
It seems that this behavior, beyond happening on the first paste, also happens on any first paste following a subsequent setting of the textarea's `.value`. Also, the bug only manifests itself when the the paste happens at the end of the input's text.

This is causing CodeMirror bug https://github.com/marijnh/CodeMirror/issues/1474
Comment 3 Jason Crawford 2013-10-08 18:23:55 PDT
I can reproduce this on in Chrome 30.0.1599.69 and in Safari 6.0.5 (8536.30.1) on Mac OS X.

Would love to see this fixed, because it messes up copy and paste in web-based spreadsheets. Can I help?
Comment 4 EWS 2022-11-30 16:45:35 PST
Committed 257205@main (a4612d781cd3): <https://commits.webkit.org/257205@main>

Reviewed commits have been landed. Closing PR #6953 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2022-11-30 16:46:18 PST
<rdar://problem/102835846>