瀏覽代碼

Merge pull request #293 from ckeditor/i/6501

Other: Removed temporary fixes for `model-selection-range-intersects` errors. See ckeditor/ckeditor5#6501. See ckeditor/ckeditor5#6382.
Piotrek Koszuliński 5 年之前
父節點
當前提交
636309901f

+ 0 - 3
packages/ckeditor5-table/src/commands/mergecellscommand.js

@@ -47,9 +47,6 @@ export default class MergeCellsCommand extends Command {
 			// All cells will be merge into the first one.
 			const firstTableCell = selectedTableCells.shift();
 
-			// This prevents the "model-selection-range-intersects" error, caused by removing row selected cells.
-			writer.setSelection( firstTableCell, 'on' );
-
 			// Update target cell dimensions.
 			const { mergeWidth, mergeHeight } = getMergeDimensions( firstTableCell, selectedTableCells, tableUtils );
 			updateNumericAttribute( 'colspan', mergeWidth, firstTableCell, writer );

+ 0 - 3
packages/ckeditor5-table/src/commands/removecolumncommand.js

@@ -65,9 +65,6 @@ export default class RemoveColumnCommand extends Command {
 		const cellToFocus = getCellToFocus( tableMap, firstCell, lastCell, removedColumnIndexes );
 
 		this.editor.model.change( writer => {
-			// A temporary workaround to avoid the "model-selection-range-intersects" error.
-			writer.setSelection( writer.createRangeOn( table ) );
-
 			const columnsToRemove = removedColumnIndexes.last - removedColumnIndexes.first + 1;
 
 			this.editor.plugins.get( 'TableUtils' ).removeColumns( table, {