From 1f18caf5ce8d4b974f82fb98884bb34cbcbbfbe0 Mon Sep 17 00:00:00 2001 From: Malik Glossop Date: Wed, 18 Feb 2026 13:02:46 +0100 Subject: [PATCH] Merge pull request #31603 from overleaf/mg-context-menu-focus-on-close Return focus to editor on context menu close GitOrigin-RevId: 60ad8040c62c5c174d70cf88e9d6698dd592bbcf --- .../js/features/source-editor/hooks/use-context-menu-items.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/services/web/frontend/js/features/source-editor/hooks/use-context-menu-items.tsx b/services/web/frontend/js/features/source-editor/hooks/use-context-menu-items.tsx index 40d1a29bbb..64ff557ea9 100644 --- a/services/web/frontend/js/features/source-editor/hooks/use-context-menu-items.tsx +++ b/services/web/frontend/js/features/source-editor/hooks/use-context-menu-items.tsx @@ -46,6 +46,7 @@ export const useContextMenuItems = () => { const closeMenu = useCallback(() => { view.dispatch({ effects: closeContextMenuEffect.of(null) }) + view.focus() }, [view]) // Handle closing the menu when it loses focus, e.g. click outside the editor