Skip to content
Permalink
Browse files

Merge branch 't/12619b' into major

  • Loading branch information...
pjasiun committed Mar 4, 2015
2 parents 7902a0e + 4b94df6 commit 68bc88addfb98a1729059393242826c9b1f9e2e8
@@ -1334,6 +1334,13 @@
// We need to call preventDefault on dragover because otherwise if
// we drop image it will overwrite document.
editable.attachListener( dropTarget, 'dragover', function( evt ) {
var target = evt.data.getTarget();

// Prevent reloading page when dragging image on empty document (#12619).
if ( target && target.is && target.is( 'html' ) ) {
evt.data.preventDefault();
return;
}

// If we do not prevent default dragover on IE the file path
// will be loaded and we will lose content. On the other hand
@@ -0,0 +1,7 @@
<div id="editor"></div>

<script>
CKEDITOR.replace( 'editor', {
imageUploadUrl: 'http://sub.ckeditor.dev/'
} );
</script>
@@ -0,0 +1,12 @@
@bender-tags: 4.5.0, tc
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, image2, uploadimage, toolbar
@bender-include: _helpers/xhr.js
1. Drag and drop some image into editable.
**Expected result:** Image should be uploaded.
**Unexpected result:** Page shouldn't be reloaded.
**Note:** This test use upload mock which will show you *Lena* instead of the real uploaded image.

0 comments on commit 68bc88a

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