Bug 80838 - Final newline (LF or CRLF) in paste buffer is converted to space
Summary: Final newline (LF or CRLF) in paste buffer is converted to space
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 08:09 PDT by gregg
Modified: 2012-10-11 02:23 PDT (History)
9 users (show)

See Also:


Attachments
Patch (6.73 KB, patch)
2012-10-11 01:16 PDT, Kunihiko Sakamoto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gregg 2012-03-12 08:09:33 PDT
Using Chrome 19.0.1061.1 dev-m (and many previous versions)

Chrome had a related bug (http://code.google.com/p/chromium/issues/detail?id=106551) dealing with the final newline in the paste buffer that they fixed (https://bugs.webkit.org/show_bug.cgi?id=79305), but they say the second part is a WebKit issue and has always been that way. However, no other browser works this way.

On a form where an INPUT TYPE=TEXT field is pasted into, the final newline is converted to a space and other browsers I tested truncate it.

Given a paste buffer of "A[newline]B[newline]C[newline]" the results of the paste into the TEXT field in various browsers is:

FireFox: "A B C"
IE: "A B C"
Chrome/WebKit: "A B C " (trailing space after C)

This is most noticeable when copying text from a MS Excel field. If the TEXT field is a password field (***) you won't even see the trailing space to know to remove it with a quick backspace.
Comment 1 Kunihiko Sakamoto 2012-10-11 01:16:13 PDT
Created attachment 168164 [details]
Patch
Comment 2 Ryosuke Niwa 2012-10-11 01:21:24 PDT
Comment on attachment 168164 [details]
Patch

Looks sane to me.
Comment 3 WebKit Review Bot 2012-10-11 02:23:50 PDT
Comment on attachment 168164 [details]
Patch

Clearing flags on attachment: 168164

Committed r131032: <http://trac.webkit.org/changeset/131032>
Comment 4 WebKit Review Bot 2012-10-11 02:23:53 PDT
All reviewed patches have been landed.  Closing bug.