Skip to content

Commit

Permalink
Revert "Keep the selection on drop"
Browse files Browse the repository at this point in the history
Note: It creates additional paragraphs when dragging non editable blocks.

This reverts commit bef6be3.
  • Loading branch information
ellatrix committed Mar 15, 2017
1 parent 719cc11 commit dcac834
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
editor.buttons.link.icon = 'gridicons-link';

var blockToolbarWidth = 0;
var beforeSelection;

function createBlockOutline( hover ) {
var outline = document.createElement( 'div' );
var handleLeft = document.createElement( 'div' );
Expand All @@ -381,7 +381,6 @@

DOM.bind( outline, 'mousedown', function( event ) {
var newEvent = Object.assign( {}, event );
beforeSelection = editor.selection.getBookmark();

if ( hover ) {
dragTarget = hoverTarget;
Expand Down Expand Up @@ -428,7 +427,7 @@
$draggedNode[0].removeAttribute( 'contenteditable' );
}
}
editor.selection.moveToBookmark(beforeSelection);

editor.nodeChanged();
} );
}
Expand Down

0 comments on commit dcac834

Please sign in to comment.