From bc6b69c73f406ac98a64f6b47fbb883943e21cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Go=C5=82aszewski?= Date: Mon, 30 Mar 2020 16:10:53 +0200 Subject: [PATCH 1/2] Remove temporary fixes for model-selection-range-intersects error. --- src/commands/removecolumncommand.js | 3 --- src/commands/removerowcommand.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/commands/removecolumncommand.js b/src/commands/removecolumncommand.js index d21aa7a3..5a60fa24 100644 --- a/src/commands/removecolumncommand.js +++ b/src/commands/removecolumncommand.js @@ -66,9 +66,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 ) ); - adjustHeadingColumns( table, removedColumnIndexes, writer ); for ( diff --git a/src/commands/removerowcommand.js b/src/commands/removerowcommand.js index c1162a10..f8b36933 100644 --- a/src/commands/removerowcommand.js +++ b/src/commands/removerowcommand.js @@ -62,9 +62,6 @@ export default class RemoveRowCommand extends Command { const columnIndexToFocus = this.editor.plugins.get( 'TableUtils' ).getCellLocation( firstCell ).column; model.change( writer => { - // This prevents the "model-selection-range-intersects" error, caused by removing row selected cells. - writer.setSelection( writer.createSelection( table, 'on' ) ); - let cellToFocus; for ( let i = removedRowIndexes.last; i >= removedRowIndexes.first; i-- ) { From 0901de5ab607443058cb94e91fd077471c3db5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Go=C5=82aszewski?= Date: Tue, 14 Apr 2020 12:29:33 +0200 Subject: [PATCH 2/2] Remove temporary fixes for model-selection-range-intersects error from MergeCellsCommand. --- src/commands/mergecellscommand.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/commands/mergecellscommand.js b/src/commands/mergecellscommand.js index c0fc30d0..37e1d09a 100644 --- a/src/commands/mergecellscommand.js +++ b/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 );