Skip to content
Permalink
Browse files

Merge branch 't/13284b'

  • Loading branch information...
Reinmar committed Sep 21, 2015
2 parents d232212 + 66a049e commit 623ade3b925b5f669adb229a997a2d779a02734e
Showing with 37 additions and 0 deletions.
  1. +1 −0 CHANGES.md
  2. +6 −0 plugins/widget/plugin.js
  3. +11 −0 tests/tickets/13284/1.html
  4. +19 −0 tests/tickets/13284/1.md
@@ -19,6 +19,7 @@ Fixed Issues:
* [#13680](http://dev.ckeditor.com/ticket/13680): Fixed: The parser should allow `<h1-6>` to be a child of the `<summary>` element.
* [#11724](http://dev.ckeditor.com/ticket/11724): [Touch devices] Fixed: Drop-downs often hide right after opening them.
* [#13690](http://dev.ckeditor.com/ticket/13690): Fixed: Copying content from IE to Chrome adding extra paragraph.
* [#13284](http://dev.ckeditor.com/ticket/13284): Fixed: Cannot drag and drop a widget if a text caret is placed just after widget instance.

Other Changes:

@@ -2496,6 +2496,12 @@
// Block widgets are handled by Lineutils.
if ( widget.inline && target.type == CKEDITOR.NODE_ELEMENT && target.hasAttribute( 'data-cke-widget-drag-handler' ) ) {
mouseDownOnDragHandler = 1;

// When drag handler is pressed we have to clear current selection if it wasn't already on this widget.
// Otherwise, the selection may be in a fillingChar, which prevents dragging a widget. (#13284, see comment 8 and 9.)
if ( widgetsRepo.focused != widget )
editor.getSelection().removeAllRanges();

return;
}

@@ -0,0 +1,11 @@
<textarea id="editor1" cols="10" rows="10" style="width:100%; height:500px;">
<p>Lorem ipsum dolor.</p>
<p>[[ABCDEFG]]</p>
<p>Lorem ipsum dolor.</p>
</textarea>
<script>
CKEDITOR.replace( 'editor1', {
extraPlugins: 'placeholder',
height: 320
} );
</script>
@@ -0,0 +1,19 @@
@bender-ui: collapsed
@bender-tags: tc, 4.5.4, 13284
@bender-ckeditor-plugins: wysiwygarea, placeholder, undo, toolbar

1. Focus placeholder widget.
2. Press <kbd>Right Arrow</kbd> key.
3. Caret should be placed next to placeholder.
4. Without focusing the widget, try to drag and drop it.

**Expected result**: Widget has been correctly moved.

**Unexpected results**: Widget didn't move, errors in console.

------------------

1. Focus placeholder widget.
2. Try to drag and drop it.

**Unexpected results**: Widget didn't move, widget border color flickered.

0 comments on commit 623ade3

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