New issue
Advanced search Search tips

Issue 696551 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Copy & Paste from CDATA nodes doesn't work

Reported by bed...@technicalpursuit.com, Feb 27 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8

Steps to reproduce the problem:
1. Load file
2. Select the text content in CDATA node (there is also a plain text node version in the test file that does work properly) and copy it via either keyboard sequence or menu selection.
3. Switch to another app in your operating system and try to paste. The content does not exist on the operating system's clipboard.

What is the expected behavior?
That the selected content would have been placed on the operating system's clipboard and be available to be pasted.

What went wrong?
The content inside of the CDATA did not get copied to the operating system's clipboard when the copy operation was performed.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 58.0.3018.3 (Official Build) dev (64-bit)  Channel: n/a
OS Version: OS X 10.12.3
Flash Version:

 
copypasteincdata.xhtml
600 bytes View Download

Comment 2 by a...@chromium.org, Feb 27 2017

Components: Blink
Components: -Blink Blink>Editing
Status: Untriaged (was: Unconfirmed)
I can reproduce this bug on 58.0.3013.3 / Linux.
Does not reproduce on Firefox.

Comment 4 by rbyers@chromium.org, Feb 27 2017

Components: Blink>DataTransfer

Comment 5 by yosin@chromium.org, Feb 28 2017

Components: -Blink>DataTransfer -Blink>Editing Blink>Editing>Command
Status: Available (was: Untriaged)
Since clipboard data contains CDataSection, it seems "paste" command failed to insert CDataSection into HTML.






Version:0.9
StartHTML:0000000172
EndHTML:0000001944
StartFragment:0000000208
EndFragment:0000001908
SourceURL:file:///C:/Users/yosin/Downloads/copypasteincdata.xhtml
<html>
<body>
<!--StartFragment--><span style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;">hen, an XHTML &lt;div&gt; with a CDATA node:<span class="Apple-converted-space"> </span></span><br style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><br style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;" /><div id="divWithCDATANode" style="color: rgb(0, 0, 0); font-family: &quot;Times New Roman&quot;; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><![CDATA[This is text in a CDATA node]]></div><!--EndFragment-->
</body>
</html> 

Hmmm... maybe the "copy" command needs to put a "plain text" version of the content on the clipboard as well?

The bug, as described, is that when pasting the CDATA content previously selected and copied from Chrome into another application (such as a text editor or word processor), no content is pasted in.

When the text "This is text in a CDATA node" is selected in Chrome and copied, I would expect that (after switching to my text editor), that a paste command would paste "This is a text in a CDATA node" into the insertion point in my text editor. That is not happening.

Comment 7 by yosin@chromium.org, Oct 4 2017

Labels: Pri-3
Project Member

Comment 8 by sheriffbot@chromium.org, Oct 4

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment