8
0
Эх сурвалжийг харах

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

Maciej Gołaszewski 7 жил өмнө
parent
commit
899604aa07

+ 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();
 	}