Skip to content

Commit

Permalink
[fix] 모달창이 띄워져도 채팅이 입력되는 오류 수정 (#222)
Browse files Browse the repository at this point in the history
fix : 모달창이 띄워져도 채팅이 입력되는 오류 수정
  • Loading branch information
Novrule authored Dec 14, 2023
1 parent b40fefd commit ca6f969
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/src/pages/BroadcastPage/BroadcastPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ const BroadcastPage = () => {
const onEnter = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (event.nativeEvent.isComposing) {
return
} else if (settingModal === true || loginModal === true || viewerModal === true || confirmModal === true) {
setChatting('')
} else if (event.key === 'Enter' && event.shiftKey === false) {
event.preventDefault()
onSend()
Expand Down Expand Up @@ -260,7 +258,11 @@ const BroadcastPage = () => {
<styles.Chat
value={chatting}
onClick={onChat}
onChange={(event) => setChatting(event.target.value)}
onChange={(event) => {
if (!settingModal && !loginModal && !viewerModal && !confirmModal) {
setChatting(event.target.value)
}
}}
onKeyDown={onEnter}
currentTheme={theme}
></styles.Chat>
Expand Down

0 comments on commit ca6f969

Please sign in to comment.