Skip to content
Permalink
Browse files

Merge branch 't/12421' into major

  • Loading branch information...
Reinmar committed Sep 30, 2014
2 parents 80b01f5 + 4f2fb22 commit 039a91ab9fbad5c5e78b6a8e2b8eb4d9460769a4
Showing with 20 additions and 1 deletion.
  1. +20 −1 plugins/clipboard/plugin.js
@@ -1321,7 +1321,17 @@
// We need to call preventDefault on dragover because otherwise if
// we drop image it will overwrite document.
editable.attachListener( dropTarget, 'dragover', function( evt ) {
evt.data.preventDefault();

// If we do not prevent default dragover on IE the file path
// will be loaded and we will lose content. On the other hand
// if we prevent it the cursor will not we shown, so we prevent
// dragover only on IE, on versions which support file API and only
// if the event contains files.
if ( CKEDITOR.env.ie &&
CKEDITOR.plugins.clipboard.isFileApiSupported &&
evt.data.$.dataTransfer.types.contains( 'Files' ) ) {
evt.data.preventDefault();
}
} );

editable.attachListener( dropTarget, 'drop', function( evt ) {
@@ -1479,6 +1489,15 @@
*/
isCustomDataTypesSupported: !CKEDITOR.env.ie,

/**
* True if the environment supports File API.
*
* @since 4.5
* @readonly
* @property {Boolean}
*/
isFileApiSupported: !CKEDITOR.env.ie || CKEDITOR.env.version > 9,

/**
* Returns the element should be used as target for the drop event.
*

0 comments on commit 039a91a

Please sign in to comment.
You can’t perform that action at this time.