Skip to content
Permalink
Browse files

Merge branch 't/12613' into major

  • Loading branch information...
pjasiun committed Mar 5, 2015
2 parents 148553f + 64615a7 commit 5394b5bdf55261b3aa4073f8d3e495a2bdb5238b
@@ -12,6 +12,7 @@ New Features:
* [#11460](http://dev.ckeditor.com/ticket/11460): Custom handling for dropped content in the editor.
* [#12168](http://dev.ckeditor.com/ticket/12168): `dataTransfer` facade.
* [#12169](http://dev.ckeditor.com/ticket/12169): Introduce [`editor.drop`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-drop), [`editor.dragstart`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-dragstart) and [`editor.dragend`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-dragend) events.
* [#12613](http://dev.ckeditor.com/ticket/12613): Show user that he can not drop on toolbar/ui on dragover.
* [#11583](http://dev.ckeditor.com/ticket/11583): Added support for HTML5 `required` attribute in various form elements. Thanks to [Steven Busse](https://github.com/sbusse)!
* [#12143](http://dev.ckeditor.com/ticket/12143): Added [`config.floatSpacePreferRight`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-floatSpacePreferRight) configuration option that switches the alignment of the floating toolbar. Thanks to [InvisibleBacon](http://github.com/InvisibleBacon)!
* [#12416](http://dev.ckeditor.com/ticket/12416): Added [`widget.definition.upcastPriority`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-upcastPriority) property which gives more control over widgets upcasting order to the widget author.
@@ -1308,7 +1308,18 @@

editor.on( 'contentDom', function() {
var editable = editor.editable(),
dropTarget = CKEDITOR.plugins.clipboard.getDropTarget( editor );
dropTarget = CKEDITOR.plugins.clipboard.getDropTarget( editor ),
top = editor.ui.space( 'top' ),
bottom = editor.ui.space( 'bottom' );

function preventDefaultSetDropEffectToNone( evt ) {
evt.data.preventDefault();
evt.data.$.dataTransfer.dropEffect = 'none';
}

// Not allowing dragging on toolbar and bottom (#12613).
top && top.on( 'dragover', preventDefaultSetDropEffectToNone );
bottom && bottom.on( 'dragover', preventDefaultSetDropEffectToNone );

// Listed on dragstart to mark internal and cross-editor drag & drop
// and save range and selected HTML.
@@ -0,0 +1,32 @@
<textarea id="editor1">
The true&lt;br/&gt;
mark of maturity&lt;br/&gt;
is when&lt;br/&gt;
somebody hurts&lt;br/&gt;
</textarea>
<div id="editor2" contenteditable="true" >
you and you try<br/>
to understand<br/>
their situation<br/>
</div>
<textarea id="editor3">
instead of trying&lt;br/&gt;
to hurt them&lt;br/&gt;
back&lt;br/&gt;
</textarea>

<script>
CKEDITOR.replace( 'editor1', {
imageUploadUrl: 'http://sub.ckeditor.dev/',
extraPlugins: 'elementspath'
} );
CKEDITOR.inline( 'editor2', {
imageUploadUrl: 'http://sub.ckeditor.dev/'
} );
CKEDITOR.replace( 'editor3', {
imageUploadUrl: 'http://sub.ckeditor.dev/',
extraPlugins: 'divarea'
} );
</script>
@@ -0,0 +1,12 @@
@bender-tags: 4.5.0, tc
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, image2, uploadimage, toolbar, floatingspace
@bender-include: _helpers/xhr.js
1. Drag and drop some image into not allowed elements (toolbar, bottom).
**Expected result:** There should be visible an no drop cursor on that elements (expect IE).
**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 5394b5b

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