Skip to content

Commit

Permalink
[fix] 채팅을 치고 나면 포커스를 잃는 오류 수정 (#216)
Browse files Browse the repository at this point in the history
fix : 채팅을 치고 나면 포커스를 잃는 오류 수정
  • Loading branch information
Novrule authored Dec 14, 2023
1 parent d78350d commit cc07602
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions client/src/pages/BroadcastPage/BroadcastPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ const BroadcastPage = () => {
}

const onSend = () => {
if (document.activeElement) {
;(document.activeElement as HTMLElement).blur()
}

if (user.id === '') {
setConfirmModalMessage('채팅을 입력하기 전 로그인을 해주세요.')
setConfirmModal(true)
Expand All @@ -151,7 +147,7 @@ const BroadcastPage = () => {
}

const onEnter = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (event.nativeEvent.isComposing) {
if (event.nativeEvent.isComposing || settingModal === true || loginModal === true || viewerModal === true || confirmModal === true) {
return
} else if (event.key === 'Enter' && event.shiftKey === false) {
event.preventDefault()
Expand Down

0 comments on commit cc07602

Please sign in to comment.