Skip to content

Commit

Permalink
Merge branch 't/13755'
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Aug 22, 2016
2 parents 846f2a1 + db0a51a commit 3f284ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,10 @@ CKEditor 4 Changelog

## CKEditor 4.5.11

Fixed Issues:

* [#13755](http://dev.ckeditor.com/ticket/13755): [Edge] Fixed: Pasting images in Edge does not work.

## CKEditor 4.5.10

Fixed Issues:
Expand Down
10 changes: 7 additions & 3 deletions plugins/clipboard/plugin.js
Expand Up @@ -2044,7 +2044,8 @@
*/
initPasteDataTransfer: function( evt, sourceEditor ) {
if ( !this.isCustomCopyCutSupported ) {
return new this.dataTransfer( null, sourceEditor );
// Edge does not support custom copy/cut, but it have some useful data in the clipboardData (#13755).
return new this.dataTransfer( ( CKEDITOR.env.edge && evt && evt.data.$ && evt.data.$.clipboardData ) || null, sourceEditor );
} else if ( evt && evt.data && evt.data.$ ) {
var dataTransfer = new this.dataTransfer( evt.data.$.clipboardData, sourceEditor );

Expand Down Expand Up @@ -2361,8 +2362,11 @@
if ( ( this.$ && this.$.files ) || file ) {
this._.files = [];

for ( i = 0; i < this.$.files.length; i++ ) {
this._.files.push( this.$.files[ i ] );
// Edge have empty files property with no length (#13755).
if ( this.$.files && this.$.files.length ) {
for ( i = 0; i < this.$.files.length; i++ ) {
this._.files.push( this.$.files[ i ] );
}
}

// Don't include $.items if both $.files and $.items contains files, because,
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/uploadwidget/manual/image2.md
@@ -1,4 +1,4 @@
@bender-tags: 4.5.0, tc, clipboard, widget, filetools
@bender-tags: 4.5.0, 4.5.11, tc, clipboard, widget, filetools, 13755
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, undo, uploadwidget, basicstyles, image2, uploadimage, font, stylescombo, basicstyles, format, maximize, blockquote, list, table, resize, elementspath, justify
@bender-include: _helpers/xhr.js
Expand Down

0 comments on commit 3f284ed

Please sign in to comment.