Open
Bug 314694
Opened 20 years ago
Updated 5 years ago
Pasting of copied text to a plain text edit box should not have whitespaces preserved if the text is not preformatted
Categories
(Core :: DOM: Serializers, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: minghong, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
Currently, whitespaces are preserved when pasting copied text into a plain text edit box, e.g. textarea, text editor, etc. This can be confusing, as what I copied is not what I pasted. Conside the following:
<p>
Oh, Hello
World!
</p>
Say I've copied "Hello World". But what I pasted will be "Hello\n World", not "Hello World". If I paste such text to a single-line input control, the second line will be dropped, leaving just "Hello".
When pasting into a plain text control, whitespaces should only be preserved for preformatted elements, e.g. <pre>, <div style="white-space: pre">, etc. Whitespaces can also be preserved when pasting into rich text editor, since this doesn't have any diffferent visually.
Reproducible: Always
Steps to Reproduce:
1. Copy some text which contains some whitespace (spaces, newlines, etc)
2. Paste the text into a plain text box
Actual Results:
Whitespace preserved. Data loss if the input control allows only one line of text.
Expected Results:
Ignore extra whitespaces. Treat multiple whitespaces as a single space character.
Updated•16 years ago
|
Assignee: dom-to-text → nobody
QA Contact: dom-to-text
Comment 1•5 years ago
|
||
Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority and severity.
If you have reason to believe this is wrong, please write a comment and ni :jstutte.
Severity: normal → S4
Priority: -- → P5
You need to log in
before you can comment on or make changes to this bug.
Description
•