Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 7497)
+++ /CKEditor/trunk/CHANGES.html (revision 7498)
@@ -49,4 +49,5 @@
#8949 : Image Properties does not show in context menu when the image is wrapped in a div with the width set.
#9008 : Fixed list items order reversed when merging two lists.
+ #9042 : [Safari] Fixed pasting left garbage html at the end of document.
Index: /CKEditor/trunk/_source/plugins/clipboard/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/clipboard/plugin.js (revision 7497)
+++ /CKEditor/trunk/_source/plugins/clipboard/plugin.js (revision 7498)
@@ -228,4 +228,17 @@
editor.removeListener( 'selectionChange', cancel );
+
+ // IE7: selection must go before removing paste bin. (#8691)
+ if ( CKEDITOR.env.ie7Compat )
+ {
+ sel.selectBookmarks( bms );
+ pastebin.remove();
+ }
+ // Webkit: selection must go after removing paste bin. (#8921)
+ else
+ {
+ pastebin.remove();
+ sel.selectBookmarks( bms );
+ }
// Grab the HTML contents.
@@ -239,7 +252,4 @@
bogusSpan : pastebin );
- // IE7: selection must go before removing paste. (#8691)
- sel.selectBookmarks( bms );
- pastebin.remove();
callback( pastebin[ 'get' + ( mode == 'text' ? 'Value' : 'Html' ) ]() );
}, 0 );