瀏覽代碼

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

Maciej Gołaszewski 7 年之前
父節點
當前提交
899604aa07
共有 1 個文件被更改,包括 5 次插入5 次删除
  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();
 	}