From 69e81119e957a78caac2ec03d06eb5838b959158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 5 Feb 2021 15:15:20 +0100 Subject: [PATCH] Don't jump to bottom on reaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/structures/MessagePanel.js | 2 +- src/components/views/rooms/SendMessageComposer.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index b8dae41ef8..371623642b 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -229,7 +229,7 @@ export default class MessagePanel extends React.Component { onAction = (payload) => { switch (payload.action) { - case "message_sent": + case "scroll_to_bottom": this.scrollToBottom(); break; } diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 7b516e1f52..62c474e417 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -403,6 +403,7 @@ export default class SendMessageComposer extends React.Component { this._editorRef.clearUndoHistory(); this._editorRef.focus(); this._clearStoredEditorState(); + dis.dispatch({action: "scroll_to_bottom"}); } componentWillUnmount() {