Open Bug 406488 Opened 13 years ago Updated 6 months ago
Copy highlighted text to clipboard ignores non-inlined CSS styling when pasting as rich text (to HTML editors, MS Word, Excel, Outlook etc
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007112705 Minefield/3.0b2pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007112705 Minefield/3.0b2pre On a windows platform, highlighting a portion of an HTML document and copying it to the clipboard preserves explicit HTML styling and inline CSS styling but ignores references to internal and external stylesheets. IE7 preserves both inline and out of line styles. Reproducible: Always Steps to Reproduce: 1. Open the attached HTML test case. 2. Right click->Select all then ctrl-C to copy to clipboard. 3. Paste the result into Microsoft Word Actual Results: HTML and inline styling (the first two rows of the table) are preserved. Internal and External stylesheet references (the last two rows of the table) are lost. Expected Results: Ideally all styling would be preserved. FWIW, Opera doesn't preserve styling at all.
Confirming. There is similar Bug 116083 but it's focused on <pre> tag so I'm not duplicating to it. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007120505 Minefield/3.0b2pre ID:2007120505
Status: UNCONFIRMED → NEW
Ever confirmed: true
This was wontfixed per bug 189320 comment 2, but it may be needs to be reconsidered, as Chrome does this (by inserting the computed style inline in the copied elements).
OS: Windows XP → All
Hardware: x86 → All
Summary: Copy highlighted text to clipboard ignores non-inlined CSS styling → Copy highlighted text to clipboard ignores non-inlined CSS styling when pasting as rich text (to HTML editors, MS Word, Excel, Outlook etc.)
Version: unspecified → Trunk
To test without MS Word you can open this data URL: data:text/html,<div contenteditable>Text then focus the div and paste.
Firefox 37.0.2 no longer copies even the inline styles. I'm not sure whether this merits opening a new bug or not. Operating system: MacOS X Yosemite. Safari and Chrome copy rich text properly.
4 years ago
Whiteboard: [parity-chrome] → [parity-chrome][platform-rel-Microsoft][platform-rel-Outlook]
I wouldn't say it's related to Microsoft or Outlook. The reason I added myself to the bug is that on Mac OS, when I try to copy from Firefox to a native Mac application that supports rich text (not a Microsoft application), the styling is not kept, while copying from Chrome/Safari keeps the styling. And it used to work in Firefox in the past.
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-chrome][platform-rel-Microsoft][platform-rel-Outlook] → [platform-rel-Microsoft][platform-rel-Outlook]
This was also reported on webcompat.com for LinkedIn copy-pasting.
See Also: → https://webcompat.com/issues/16508
Whiteboard: [platform-rel-Microsoft][platform-rel-Outlook] → [platform-rel-Microsoft][platform-rel-Outlook][webcompat]
Webcompat Priority: --- → ?
You need to log in before you can comment on or make changes to this bug.