Skip to content

Commit

Permalink
Merge pull request #293 from ckeditor/i/6501
Browse files Browse the repository at this point in the history
Other: Removed temporary fixes for `model-selection-range-intersects` errors. See #6501. See #6382.
  • Loading branch information
Reinmar authored Apr 14, 2020
2 parents 84abbb8 + f476ba7 commit 6363099
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions packages/ckeditor5-table/src/commands/mergecellscommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
3 changes: 0 additions & 3 deletions packages/ckeditor5-table/src/commands/removecolumncommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 6363099

Please sign in to comment.