Skip to content

Commit

Permalink
Merge branch 't/12022'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed May 28, 2014
2 parents fd15d20 + 08a0a48 commit d50ebea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Fixed Issues:

* [#11983](http://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-getByElement) method has been improved.
* [#12000](http://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) and [`nestedEditable.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable-method-setData).
* [#12022](http://dev.ckeditor.com/ticket/12022): Fixed: Outer widget's drag handler is not created at all if it has any nested widgets inside.
* [#11960](http://dev.ckeditor.com/ticket/11960): [Blink/Webkit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case).
* [#11306](http://dev.ckeditor.com/ticket/11306): [OSX][Blink/Webkit] Fixed: No widget's entries in context menu on widget right-click.
* [#11957](http://dev.ckeditor.com/ticket/11957): Fixed: Alignment labels in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog are not translated.
Expand Down
8 changes: 7 additions & 1 deletion plugins/widget/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,11 @@
return element.type == CKEDITOR.NODE_ELEMENT && element.hasAttribute( 'data-cke-widget-drag-handler' );
}

// @param {CKEDITOR.dom.element}
function isDomDragHandlerContainer( element ) {
return element.type == CKEDITOR.NODE_ELEMENT && element.hasClass( 'cke_widget_drag_handler_container' );
}

function finalizeNativeDrop( editor, sourceWidget, range ) {
// Save the snapshot with the state before moving widget.
// Focus widget, so when we'll undo the DnD, widget will be focused.
Expand Down Expand Up @@ -2852,7 +2857,8 @@
return;

var editor = widget.editor,
container = widget.wrapper.findOne( '.cke_widget_drag_handler_container' ),
// Use getLast to find wrapper's direct descendant (#12022).
container = widget.wrapper.getLast( isDomDragHandlerContainer ),
img;

// Reuse drag handler if already exists (#11281).
Expand Down

0 comments on commit d50ebea

Please sign in to comment.