Bug 8107
Summary: | REGRESSION (NativeTextField): Paste adds extra space in empty text field elements | ||
---|---|---|---|
Product: | WebKit | Reporter: | Steven Fisher <sdfisher> |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | Keywords: | Regression |
Priority: | P1 | ||
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Steven Fisher
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).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Steven Fisher
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.)
mitz
See also bug 8104
Adele Peterson
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 ***
Steven Fisher
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.
Steven Fisher
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}
Adele Peterson
Ah, I understand now. reopening.
Maciej Stachowiak
These are all text field regressions so they should all be P1.
Steven Fisher
Adele asked me to check this again. I can't reproduce it with recent builds.
Adele Peterson
I'm guessing that one of the changes from this weekend fixed this issue also.
Resolving as fixed.
Thanks Steven!