diff --git a/web/src/ui/composer/MessageComposer.tsx b/web/src/ui/composer/MessageComposer.tsx index 5bdc5a2..0124c0e 100644 --- a/web/src/ui/composer/MessageComposer.tsx +++ b/web/src/ui/composer/MessageComposer.tsx @@ -384,7 +384,9 @@ const MessageComposer = () => { textRows.current = newTextRows // This has to be called unconditionally, because setting rows = 1 messes up the scroll state otherwise roomCtx.scrollToBottom() - }, [state.text, roomCtx]) + // scrollToBottom needs to be called when replies/attachments/etc change, + // so listen to state instead of only state.text + }, [state, roomCtx]) // Saving to localStorage could be done in the reducer, but that's not very proper, so do it in an effect. useEffect(() => { roomCtx.isEditing.emit(editing !== null)