Parcourir la source

Allow table selection to cross heading.

Maciej Gołaszewski il y a 5 ans
Parent
commit
0c24e3b7e8
1 fichiers modifiés avec 2 ajouts et 9 suppressions
  1. 2 9
      packages/ckeditor5-table/src/tableselection.js

+ 2 - 9
packages/ckeditor5-table/src/tableselection.js

@@ -155,15 +155,8 @@ export default class TableSelection extends Plugin {
 			return;
 		}
 
-		const headingRows = parseInt( table.getAttribute( 'headingRows' ) || 0 );
-		const startInHeading = this._startElement.parent.index < headingRows;
-		const updateCellInHeading = tableCell.parent.index < headingRows;
-
-		// Only add cell to selection if they are in the same table section.
-		if ( startInHeading === updateCellInHeading ) {
-			this._endElement = tableCell;
-			this.redrawSelection();
-		}
+		this._endElement = tableCell;
+		this.redrawSelection();
 	}
 
 	stopSelection( tableCell ) {