Преглед изворни кода

Set selection after deleting content to make typing possible.

Maciej Gołaszewski пре 6 година
родитељ
комит
82e38f89ed
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      packages/ckeditor5-table/src/tableclipboard.js

+ 5 - 0
packages/ckeditor5-table/src/tableclipboard.js

@@ -58,10 +58,15 @@ export default class TableClipboard extends Plugin {
 
 		this.listenTo( editor.model, 'deleteContent', ( evt, args ) => {
 			const [ selection ] = args;
+
 			if ( this._tableSelection.hasMultiCellSelection && selection.is( 'documentSelection' ) ) {
 				evt.stop();
 
 				clearTableCellsContents( this.editor.model, this._tableSelection.getSelectedTableCells() );
+
+				editor.model.change( writer => {
+					writer.setSelection( Array.from( this._tableSelection.getSelectedTableCells() ).pop(), 0 );
+				} );
 			}
 		}, { priority: 'high' } );
 	}