diff --git a/services/web/frontend/js/features/review-panel-new/components/review-panel-message.tsx b/services/web/frontend/js/features/review-panel-new/components/review-panel-message.tsx index d1eb34f7e4..2104c8af8f 100644 --- a/services/web/frontend/js/features/review-panel-new/components/review-panel-message.tsx +++ b/services/web/frontend/js/features/review-panel-new/components/review-panel-message.tsx @@ -51,32 +51,6 @@ export const ReviewPanelMessage: FC<{ setDeleting(false) }, [onDelete]) - if (editing) { - return ( -
- setContent(e.target.value)} - onKeyDown={e => { - if ( - e.key === 'Enter' && - !e.shiftKey && - !e.ctrlKey && - !e.metaKey && - content - ) { - e.preventDefault() - handleSubmit() - } - }} - value={content} - autoFocus // eslint-disable-line jsx-a11y/no-autofocus - /> -
- ) - } - return (
@@ -90,7 +64,7 @@ export const ReviewPanelMessage: FC<{
- {!isReply && !isThreadResolved && ( + {!editing && !isReply && !isThreadResolved && ( )} - {!isThreadResolved && ( + {!editing && !isThreadResolved && (
- - {message.content} - + {editing ? ( + setContent(e.target.value)} + onKeyDown={e => { + if ( + e.key === 'Enter' && + !e.shiftKey && + !e.ctrlKey && + !e.metaKey && + content + ) { + e.preventDefault() + ;(e.target as HTMLTextAreaElement).blur() + } + }} + value={content} + autoFocus // eslint-disable-line jsx-a11y/no-autofocus + /> + ) : ( + + {message.content} + + )} + {deleting && (