diff --git a/src/components/pages/chat/chat-input/index.tsx b/src/components/pages/chat/chat-input/index.tsx index ddc78883..d5d61256 100644 --- a/src/components/pages/chat/chat-input/index.tsx +++ b/src/components/pages/chat/chat-input/index.tsx @@ -11,12 +11,16 @@ export const ChatInput = ({ onSubmit }: IProps) => { const [message, setMessage] = useState(''); const inputRef = useRef(null); + const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); + // Enter 키로 전송, Shift + Enter 로 줄바꿈 const handleKeyDown = (e: React.KeyboardEvent) => { - if (e.key === 'Enter' && !e.shiftKey) { - e.preventDefault(); - handleSubmit(); - } + if (isMobile) return; + if (e.key !== 'Enter' || e.shiftKey) return; + if (e.nativeEvent.isComposing) return; + + e.preventDefault(); + handleSubmit(); }; const handleSubmit = () => {