diff --git a/src/views/room/widgets/chat-input/ChatInputView.tsx b/src/views/room/widgets/chat-input/ChatInputView.tsx index c1ac2a3b..534dd93c 100644 --- a/src/views/room/widgets/chat-input/ChatInputView.tsx +++ b/src/views/room/widgets/chat-input/ChatInputView.tsx @@ -260,11 +260,18 @@ export const ChatInputView: FC<{}> = props => } }, [ onKeyDownEvent ]); + useEffect(() => + { + if(!inputRef.current) return; + + inputRef.current.parentElement.dataset.value = chatValue; + }, [ chatValue ]); + return ( createPortal(
- { event.target.parentElement.dataset.value = event.target.value; updateChatInput(event.target.value) } } onMouseDown={ event => setInputFocus() } /> + updateChatInput(event.target.value) } onMouseDown={ event => setInputFocus() } />
, document.getElementById('toolbar-chat-input-container'))