Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for bookmarks created inside temporary elements #3487

Merged
merged 9 commits into from
Sep 25, 2019
Prev Previous commit
Next Next commit
Omit copybin and pastebin.
Comandeer committed Sep 25, 2019
commit 0274b34329fc876bddd334c7b8deca9e46a1bec3
11 changes: 10 additions & 1 deletion core/dom/range.js
Original file line number Diff line number Diff line change
@@ -801,9 +801,18 @@ CKEDITOR.dom.range = function( root ) {

function getTemporary( node ) {
return node.getAscendant( function( node ) {
return node.data && node.data( 'cke-temp' );
return node.data && node.data( 'cke-temp' ) && !isClipboardBin( node );
}, true );
}

function isClipboardBin( node ) {
var ids = [
'cke_copybin',
'cke_pastebin'
];

return CKEDITOR.tools.array.indexOf( ids, node.getAttribute( 'id' ) ) !== -1;
}
},

/**