Skip to content

Commit

Permalink
Merge pull request #426 from js43o/enhance-chatting-4
Browse files Browse the repository at this point in the history
[Fix] 맥 환경에서 채팅 마지막 글자가 중복 전송되는 현상 수정
  • Loading branch information
js43o authored Dec 11, 2023
2 parents 2d310d3 + 3fe3983 commit 39e2e9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function ChattingFooter({ userId, sendMessage }: ChattingFooterProps) {
};

const onKeydownTextarea = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter' && !e.shiftKey) {
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault();
handleSendMessage();
}
Expand Down

0 comments on commit 39e2e9c

Please sign in to comment.