diff --git a/front/src/modules/comments/components/RightDrawerComments.tsx b/front/src/modules/comments/components/RightDrawerComments.tsx index 804477f8b..eab5a97b7 100644 --- a/front/src/modules/comments/components/RightDrawerComments.tsx +++ b/front/src/modules/comments/components/RightDrawerComments.tsx @@ -1,6 +1,8 @@ import { useRecoilState } from 'recoil'; import { CommentThreadForDrawer } from '@/comments/types/CommentThreadForDrawer'; +import { useHotkeysScopeOnMountOnly } from '@/hotkeys/hooks/useHotkeysScopeOnMountOnly'; +import { InternalHotkeysScope } from '@/hotkeys/types/internal/InternalHotkeysScope'; import { RightDrawerBody } from '@/ui/layout/right-drawer/components/RightDrawerBody'; import { RightDrawerPage } from '@/ui/layout/right-drawer/components/RightDrawerPage'; import { RightDrawerTopBar } from '@/ui/layout/right-drawer/components/RightDrawerTopBar'; @@ -15,6 +17,10 @@ import { CommentThread } from './CommentThread'; export function RightDrawerComments() { const [commentableEntityArray] = useRecoilState(commentableEntityArrayState); + useHotkeysScopeOnMountOnly({ + scope: InternalHotkeysScope.RightDrawer, + customScopes: { goto: false, 'command-menu': true }, + }); const { data: queryResult } = useGetCommentThreadsByTargetsQuery({ variables: { diff --git a/front/src/modules/comments/components/RightDrawerCreateCommentThread.tsx b/front/src/modules/comments/components/RightDrawerCreateCommentThread.tsx index d099851a4..78e497dc5 100644 --- a/front/src/modules/comments/components/RightDrawerCreateCommentThread.tsx +++ b/front/src/modules/comments/components/RightDrawerCreateCommentThread.tsx @@ -1,3 +1,5 @@ +import { useHotkeysScopeOnMountOnly } from '@/hotkeys/hooks/useHotkeysScopeOnMountOnly'; +import { InternalHotkeysScope } from '@/hotkeys/types/internal/InternalHotkeysScope'; import { RightDrawerBody } from '@/ui/layout/right-drawer/components/RightDrawerBody'; import { RightDrawerPage } from '@/ui/layout/right-drawer/components/RightDrawerPage'; import { RightDrawerTopBar } from '@/ui/layout/right-drawer/components/RightDrawerTopBar'; @@ -5,6 +7,10 @@ import { RightDrawerTopBar } from '@/ui/layout/right-drawer/components/RightDraw import { CommentThreadCreateMode } from './CommentThreadCreateMode'; export function RightDrawerCreateCommentThread() { + useHotkeysScopeOnMountOnly({ + scope: InternalHotkeysScope.RightDrawer, + customScopes: { goto: false, 'command-menu': true }, + }); return (