소스 검색

Merge pull request #31603 from overleaf/mg-context-menu-focus-on-close

Return focus to editor on context menu close

GitOrigin-RevId: 60ad8040c62c5c174d70cf88e9d6698dd592bbcf
Malik Glossop 9 달 전
부모
커밋
1f18caf5ce
1개의 변경된 파일과 1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      services/web/frontend/js/features/source-editor/hooks/use-context-menu-items.tsx

+ 1 - 0
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