From f2355250d9788a61ecc1fc543240432817f9cace Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Sat, 23 Nov 2024 17:01:05 -0800 Subject: [PATCH] Fix firefox mousemove range->table selection --- packages/lexical-table/src/LexicalTableSelectionHelpers.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/lexical-table/src/LexicalTableSelectionHelpers.ts b/packages/lexical-table/src/LexicalTableSelectionHelpers.ts index 0725e6388ef..2a1e4945037 100644 --- a/packages/lexical-table/src/LexicalTableSelectionHelpers.ts +++ b/packages/lexical-table/src/LexicalTableSelectionHelpers.ts @@ -835,6 +835,13 @@ export function applyTableHandlers( tableObserver.$setFocusCellForSelection(focusCell); return true; } + } else if ( + focusCell !== tableObserver.anchorCell && + $isSelectionInTable(selection, tableNode) + ) { + // The selection has crossed cells + tableObserver.$setFocusCellForSelection(focusCell); + return true; } } const shouldCheckSelection =