8
0
Просмотр исходного кода

Set selection after deleting content to make typing possible.

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
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' } );
 	}