Skip to content

Commit

Permalink
Merge branch 't/11145' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Nov 13, 2013
2 parents ee16e05 + ce0b84b commit 7b7a63c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions plugins/widget/plugin.js
Expand Up @@ -2518,17 +2518,8 @@
img.on( 'dragstart', function( evt ) {
evt.data.$.dataTransfer.setData( 'text', JSON.stringify( { type: 'cke-widget', editor: editor.name, id: widget.id } ) );
} );
} else {
// Quite frankly, I got no better idea how to prevent IE8 from
// starting native D&D there. So... tadaaa.
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) {
img.on( 'dragstart', function( evt ) {
evt.data.preventDefault();
} );
}

} else
img.on( 'mousedown', onBlockWidgetDrag, widget );
}

container.append( img );
widget.wrapper.append( container );
Expand Down Expand Up @@ -2687,6 +2678,15 @@
setupMask( widget );
setupDragHandler( widget );

// #11145: [IE8] Non-editable content of widget is draggable.
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) {
widget.wrapper.on( 'dragstart', function( evt ) {
// Allow text dragging inside nested editables.
if ( !getNestedEditable( widget, evt.data.getTarget() ) )
evt.data.preventDefault();
} );
}

widget.wrapper.removeClass( 'cke_widget_new' );
widget.element.addClass( 'cke_widget_element' );

Expand Down

0 comments on commit 7b7a63c

Please sign in to comment.