when copying and pasting from a div with the css property white-space set to 'pre', new lines are not copied.

RESOLVED DUPLICATE of bug 116083

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 116083
9 years ago
9 years ago

People

(Reporter: Mike, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)

When you select text in a div with the css property white-space set to 'pre' (i.e. white-space: pre; in your css), the new lines in the div do not copy to the clipboard, it pastes as one long line. I've provided an example on my site (http://unknownmp.site40.net/13). It is not the site, in IE it copies and pastes correctly.

Reproducible: Always

Steps to Reproduce:
1. Highlight the text in the right div (the one with the javascript code)
2. Right click the text and hit copy.
3. Open any text editor and paste the contents of the clipboard into it
Actual Results:  
the text came out as one long line, even though it spans 6 lines in the div

Expected Results:  
the text should come out as 6 lines, just like in the div.

this only started happening early, possibly in  firefox 3.0.1 or 3.0.2

Comment 1

9 years ago
Bug confirmed present in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3

Comment 2

9 years ago
Bug confirmed present in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080924 Ubuntu/8.04 (hardy) Firefox/2.0.0.17

Comment 3

9 years ago
Possible dupe 116083
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 116083
You need to log in before you can comment on or make changes to this bug.