Open Bug 1333760 Opened 7 years ago Updated 2 years ago

Copying HTML to the clipboard doesn't copy background colour for a single element.

Categories

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

50 Branch
x86_64
All
defect

Tracking

()

People

(Reporter: sjom106, Unassigned)

References

Details

(Keywords: 64bit)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce:

I can reproduce on Firefox 50.1.0 and also Firefox Nightly 54.0a1 (2017-01-25) (64-bit) by following these steps:

1. Head to https://jsfiddle.net/SamMiller/ubm10f69/
2. Double click on "PURPLE".
3. Press ctrl + c to copy the selection to the clipboard.
4. Click within the red HTML checker content editable box
5. Press ctrl + v to paste the clipboard contents into the HTML checker box.

(If I click and drag the selection from the start of "PURPLE" to the end of "BLUE", copy that to the clipboard using ctrl + c, and paste it into the HTML checker box, both the purple and the blue background colours, including the text, are pasted into the box).




Actual results:

"PURPLE" is copied into the box but the purple background colour is missing.


Expected results:

The purple background colour should of been pasted with the "PURPLE" text.
Keywords: 64bit
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0

I have tested your issue on Window 8.1 x64 with latest Firefox release v51.0.1, latest Nightly (Build ID: 20170129110302) and managed to reproduce it. On Chrome the text is pasted also with the background color.

This issue is also reproducible on Ubuntu 14.04 and Mac OS X 10.12.
Status: UNCONFIRMED → NEW
Component: Untriaged → XP Toolkit/Widgets: XUL
Ever confirmed: true
OS: Windows 10 → All
Product: Firefox → Core
Component: XP Toolkit/Widgets: XUL → Serializers
Priority: -- → P3
See Also: → 1428046
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.