diff --git a/services/web/frontend/js/features/source-editor/components/review-panel/editor-widgets/editor-widgets.tsx b/services/web/frontend/js/features/source-editor/components/review-panel/editor-widgets/editor-widgets.tsx index 51fb561ee1..76fc59b6f5 100644 --- a/services/web/frontend/js/features/source-editor/components/review-panel/editor-widgets/editor-widgets.tsx +++ b/services/web/frontend/js/features/source-editor/components/review-panel/editor-widgets/editor-widgets.tsx @@ -12,6 +12,8 @@ import { useCodeMirrorViewContext } from '../../codemirror-editor' import Modal, { useBulkActionsModal } from '../entries/bulk-actions-entry/modal' import getMeta from '../../../../../utils/meta' import useScopeValue from '../../../../../shared/hooks/use-scope-value' +import useScopeEventListener from '@/shared/hooks/use-scope-event-listener' +import { useCallback } from 'react' function EditorWidgets() { const { t } = useTranslation() @@ -54,6 +56,13 @@ function EditorWidgets() { }, 0) } + useScopeEventListener( + 'comment:start_adding', + useCallback(() => { + setIsAddingComment(true) + }, [setIsAddingComment]) + ) + return ReactDOM.createPortal( <>