Fix onKeyPress listener in AutoExpandingTextArea (#22040)

GitOrigin-RevId: 3fe870fe3aa16e6ed212ea4347a31e57444ad5e6
This commit is contained in:
Domagoj Kriskovic
2024-11-21 14:00:17 +01:00
committed by Copybot
parent 2226cfd233
commit 2c6dd4e56b
3 changed files with 3 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ export const ReviewPanelAddComment: FC<{
name="message"
className="review-panel-add-comment-textarea"
onChange={handleChange}
onKeyDown={handleKeyPress}
onKeyPress={handleKeyPress}
placeholder={t('add_your_comment_here')}
value={content}
disabled={submitting}

View File

@@ -95,7 +95,7 @@ export const ReviewPanelCommentContent = memo<{
name="content"
className="review-panel-comment-input"
onChange={handleChange}
onKeyDown={handleKeyPress}
onKeyPress={handleKeyPress}
placeholder={t('reply')}
value={content}
/>

View File

@@ -96,7 +96,7 @@ export const ReviewPanelMessage: FC<{
className="review-panel-comment-input review-panel-comment-edit"
onBlur={handleSubmit}
onChange={e => setContent(e.target.value)}
onKeyDown={e => {
onKeyPress={e => {
if (
e.key === 'Enter' &&
!e.shiftKey &&