Skip to content

Commit

Permalink
Merge pull request #170 from F3B4-KDT-Project/167-fix
Browse files Browse the repository at this point in the history
fix: 한글 채팅 시 마지막 글자 중복 출력 오류 해결
  • Loading branch information
yundol777 authored Feb 27, 2025
2 parents e506dd5 + ddfeadf commit 1ca3172
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/post/Chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ const Chat: React.FC = () => {
const handleEnterKey = (
e: React.KeyboardEvent<HTMLTextAreaElement>
): void => {
// 한글이 조합 중일 때 엔터 키 중복 적용 방지.
if (e.nativeEvent.isComposing) {
return;
}

if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
handleSend();
Expand Down

0 comments on commit 1ca3172

Please sign in to comment.