Bug 8107 - REGRESSION (NativeTextField): Paste adds extra space in empty text field elements
Summary: REGRESSION (NativeTextField): Paste adds extra space in empty text field elem...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-03-31 11:54 PST by Steven Fisher
Modified: 2006-04-03 16:10 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Fisher 2006-03-31 11:54:36 PST
1. Open TextEdit.
2. Use rich text mode.
3. Type "word" (without quotes or new line).
4. Select All.
5. Copy.
6. Switch to Safari.
7. Paste the text into an empty, single line TEXTAREA element (the URL field in bugzilla works).
Comment 1 Steven Fisher 2006-03-31 11:55:28 PST
Forgot to mention the effect: Text is pasted in with a carriage return after it. It shouldn't have one.

(Also, I'm fixing the version and adding keywords.)
Comment 2 mitz 2006-03-31 12:08:56 PST
See also bug 8104
Comment 3 Adele Peterson 2006-03-31 13:00:10 PST
I think the originator meant text field, instead of textarea.  Actually, this is a dupe of 8104, so I'll mark it as such.

Steven, if you don't think this is a dupe, please let us know!  Thanks!

*** This bug has been marked as a duplicate of 8104 ***
Comment 4 Steven Fisher 2006-03-31 13:05:26 PST
They may be duplicates, but I am not entirely convinced. The other defect is that pasting does not stop at newline characters. This one is that paste seems to actually make up newline characters if none are present. However, maybe this is a TextEdit bug (it is adding newline characters to the end of the clipboard). I'll see if I can find a clipboard inspector.
Comment 5 Steven Fisher 2006-03-31 13:13:19 PST
I believe the extra linefeeds are coming from the RTF clipboard flavour. Although the RTF doesn't specify newlines in the text, RTF flavor includes newlines because of the nature of RTF ("never say in 1 word what you can say in 8 lines"):

{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf330
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\fs24 \cf0 text}
Comment 6 Adele Peterson 2006-03-31 14:09:05 PST
Ah, I understand now.  reopening.
Comment 7 Maciej Stachowiak 2006-04-02 23:25:43 PDT
These are all text field regressions so they should all be P1.
Comment 8 Steven Fisher 2006-04-03 16:03:22 PDT
Adele asked me to check this again. I can't reproduce it with recent builds.
Comment 9 Adele Peterson 2006-04-03 16:10:14 PDT
I'm guessing that one of the changes from this weekend fixed this issue also.

Resolving as fixed.

Thanks Steven!