Opened 8 years ago
Last modified 8 years ago
#14765 confirmed Bug
Copying from IE divarea editor to Chrome/Firefox in results in full nodes path.
Reported by: | Jakub Ś | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.5.0 |
Keywords: | IBM | Cc: | satya_minnekanti@… |
Description (last modified by )
Steps to reproduce
- Open any sample page say api.html in Chrome and set
pasteFilter
config to null andallowedContent
to true.CKEDITOR.replace( 'editor1', { allowedContent : true, pasteFilter : null, ...
- Open http://ckeditor.com/demo#div in IE browser and copy two paragraphs
- Paste the content in api.html page which is opened in chrome and go to Source mode
Expected result
Only two paragraphs get pasted.
Actual result
It looks like paragraph plus every node above/below also get pasted.
Other details (browser, OS, CKEditor version, installed plugins)
This is a special case where you need to disable pasteFilter
to get this result. User who reported it, does some paste filtering on his own but he can't really do much in this case as he doesn't know what the original selection from other browser was.
This doesn't happen in native contenteditable thus I have decided to report it.
Problem can be reproduced when copying from IE and pasting into Chrome or Firefox.
Attachments (2)
Change History (6)
comment:1 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
Changed 8 years ago by
Attachment: | result.png added |
---|
Changed 8 years ago by
Attachment: | result2.png added |
---|
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Cc: | satya_minnekanti@… added |
---|
comment:4 Changed 8 years ago by
Keywords: | IBM added |
---|
The problem here is that new clipboard API introduced in 4.5.0 skips
<!--StartFragment-->
markers, which in this particular example plays an important role, because IE is giving whole context (parent elements) to the clipboard, and marks actual selection with<!--StartFragment-->
.My git blame has shown that initial reason for this decision was to fix pasting from apps like MS Excel, which put
<!--StartFragment-->
markers in a wrong place, e.g. inside the table like so:Fixing this problem would require a more time, to ensure we do not fall for regressions.