Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Remove temporary fixes for model-selection-range-intersects error. #293

Merged
merged 4 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions 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 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