Explorar o código

Fix the logic behind adjusting cell's rowspan on removing row.

Maciej Gołaszewski %!s(int64=5) %!d(string=hai) anos
pai
achega
2d1df121cc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/ckeditor5-table/src/tableutils.js

+ 1 - 1
packages/ckeditor5-table/src/tableutils.js

@@ -311,7 +311,7 @@ export default class TableUtils extends Plugin {
 			const isCellOverlappingRemovedRows = row < first && lastRowOfCell >= first;
 
 			if ( isCellOverlappingRemovedRows ) {
-				const rowspanAdjustment = lastRowOfCell >= last ? rowsToRemove : first - row;
+				const rowspanAdjustment = lastRowOfCell >= last ? rowsToRemove : lastRowOfCell - first + 1;
 				const rowSpanToSet = rowspan - rowspanAdjustment;
 				cellsToTrim.push( { cell, rowspan: rowSpanToSet } );
 			}