Closed Bug 1464664 Opened 6 years ago Closed 6 years ago

Copying text from a element whose style is white-space:pre-line isn't has right linebreak

Categories

(Core :: DOM: Serializers, defect, P3)

60 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1174452

People

(Reporter: yinyue200, Unassigned)

Details

Attachments

(1 file)

Attached file test.html
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180516032328

Steps to reproduce:

1. Use the context menu to copy the contents of the HTML page

Microsoft Edge 42.17134 and Google Chrome 66 has the expected result.
Internet Explorer 11 's result is the same as Firefox.


Actual results:

the result is:
 One Two Three


Expected results:

One
Two
Three
I was able to reproduce this bug.

Version 	60.0.1
Build ID 	20180516032328
Update Channel 	release
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

I followed the Steps to Reproduce and have same Actual Result as a reporter. 

In Firefox the html content is looks like:  One Two Three
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout
Ever confirmed: true
Product: Firefox → Core
This seems to belong to serializers. I suspect the related code lays in nsXHTMLContentSerializer::AppendText[1].

[1] https://searchfox.org/mozilla-central/rev/cf464eabfeba64e866c1fa36b9fefd674dca9c51/dom/base/nsXHTMLContentSerializer.cpp#132-153
Component: Layout → Serializers
Status: NEW → RESOLVED
Closed: 6 years ago
Priority: -- → P3
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: