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