WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
28333
copying text inside input element to content-editable region adds white-space: pre
https://bugs.webkit.org/show_bug.cgi?id=28333
Summary
copying text inside input element to content-editable region adds white-space...
Ryosuke Niwa
Reported
2009-08-14 17:41:49 PDT
Copy any text from input element to content-editable region, WebKit adds "white-space: pre" style to the text. Reproduction steps: 1. Go
http://www.mozilla.org/editor/midasdemo/
2. Go HTML source mode, and put <input> 3. Go back to WYSIWYG mode, and type something in the input element. 4. Copy & paste what you typed in the element to outside. 5. "white-space: pre" is added to this text. Check it on HTML source mode. This bug causes major websites such as Gmail to include "white-space: pre" in outgoing e-mails.
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2009-08-14 17:49:36 PDT
I have a feeling that WebKit is explicitly adding white-space: pre to input element. +ap for her expertise on forms.
Alexey Proskuryakov
Comment 2
2009-08-14 22:12:18 PDT
I do not know anything about this specifically, but without "white-space: pre", multiple spaces would be contracted to one space. Just try "<p>l l</p>" in an HTML document. Contenteditable inserts NBSPs to avoid this, but this trick cannot be used with form elements. Perhaps it can be used when serializing content for pasteboard, but to start considering this, it would help to know why the current behavior is a problem.
Alexey Proskuryakov
Comment 3
2009-08-14 22:13:23 PDT
(In reply to
comment #2
)
> Just try "<p>l > l</p>" in an HTML document.
That was meant to be "l", many spaces, "l".
Ryosuke Niwa
Comment 4
2009-08-14 22:58:13 PDT
(In reply to
comment #2
)
> I do not know anything about this specifically
Sorry wrong username. I meant to add Adele. +adele & -ap. Sorry about the confusion.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug