From b086d432d151694e045e2a17739544f560b5160c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Thu, 5 Jan 2023 04:14:12 +0100 Subject: [PATCH] fix: Chat Input isn't focused after editing a message Fixes #8966 --- ui/app/AppLayouts/Chat/views/ChatContentView.qml | 1 + ui/app/AppLayouts/Chat/views/ChatMessagesView.qml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ui/app/AppLayouts/Chat/views/ChatContentView.qml b/ui/app/AppLayouts/Chat/views/ChatContentView.qml index 34786519e4..0550f81fa9 100644 --- a/ui/app/AppLayouts/Chat/views/ChatContentView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatContentView.qml @@ -162,6 +162,7 @@ ColumnLayout { onOpenStickerPackPopup: { root.openStickerPackPopup(stickerPackId); } + onEditModeChanged: if (!editModeOn) chatInput.forceInputActiveFocus() } Item { diff --git a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml index ede5b45f11..5641f38660 100644 --- a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml @@ -44,6 +44,7 @@ Item { signal openStickerPackPopup(string stickerPackId) signal showReplyArea(string messageId, string author) + signal editModeChanged(bool editModeOn) QtObject { id: d @@ -272,6 +273,7 @@ Item { sticker: model.sticker stickerPack: model.stickerPack editModeOn: model.editMode + onEditModeOnChanged: root.editModeChanged(editModeOn) isEdited: model.isEdited linkUrls: model.links messageAttachments: model.messageAttachments