diff --git a/tinymce-single/tinymce/block.js b/tinymce-single/tinymce/block.js index 201a752d841677..46b2af369d18ea 100644 --- a/tinymce-single/tinymce/block.js +++ b/tinymce-single/tinymce/block.js @@ -166,7 +166,10 @@ $prev = $blocks.first().prev(); if ( $prev.length ) { - $blocks.last().after( $prev ); + editor.undoManager.transact( function() { + $blocks.last().after( $prev ); + } ); + editor.nodeChanged(); window.scrollBy( 0, - rect.top + element.getBoundingClientRect().top ); } @@ -178,7 +181,10 @@ $next = $blocks.last().next(); if ( $next.length ) { - $blocks.first().before( $next ); + editor.undoManager.transact( function() { + $blocks.first().before( $next ); + } ); + editor.nodeChanged(); window.scrollBy( 0, - rect.top + element.getBoundingClientRect().top ); }