Răsfoiți Sursa

Changed: Make stopSelection work when mouse move outside the table.

Maciej Gołaszewski 7 ani în urmă
părinte
comite
899604aa07
1 a modificat fișierele cu 5 adăugiri și 5 ștergeri
  1. 5 5
      packages/ckeditor5-table/src/tableediting.js

+ 5 - 5
packages/ckeditor5-table/src/tableediting.js

@@ -194,10 +194,6 @@ export default class TableEditing extends Plugin {
 
 			const tableCell = getTableCell( domEventData, this.editor );
 
-			if ( !tableCell ) {
-				return;
-			}
-
 			tableSelection.stopSelection( tableCell );
 		} );
 
@@ -377,7 +373,11 @@ class TableSelection {
 
 	stopSelection( tableCell ) {
 		this._isSelecting = false;
-		this._endElement = tableCell;
+
+		if ( tableCell ) {
+			this._endElement = tableCell;
+		}
+
 		this._redrawSelection();
 	}