Skip to content

Commit 70a832e

Browse files
authored
fix: resolve unneeded error being thrown (#1503)
resolves: https://blocknote-js.sentry.io/issues/32147104 The drag over handler is listening to the root element, so you are not guaranteed to be hovering over a table: https://github.com/TypeCellOS/BlockNote/blob/aed9fb5044a0da73276c322b685dd838193247d0/packages/core/src/extensions/TableHandles/TableHandlesPlugin.ts#L186-L189 in which case, the previous state should still be maintained for the drop to actually switch the rows
1 parent 003b44f commit 70a832e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/extensions/TableHandles/TableHandlesPlugin.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,7 @@ export class TableHandlesView<
394394
(element) => element.tagName === "TD" || element.tagName === "TH"
395395
);
396396
if (tableCellElements.length === 0) {
397-
throw new Error(
398-
"Could not find table cell element that the mouse cursor is hovering over."
399-
);
397+
return;
400398
}
401399
const tableCellElement = tableCellElements[0];
402400

0 commit comments

Comments
 (0)