[network/kaidan] src/qml: GlobalDrawer: Fix focusing message input field after opening chat page
Melvin Keskin <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 77896da74745b1f9b375551d42d2b6fe3b85ab81 by Melvin Keskin.
Committed on 25/07/2026 at 17:06.
Pushed by melvo into branch 'master'.
GlobalDrawer: Fix focusing message input field after opening chat page
M +10 -0 src/qml/GlobalDrawer.qml
https://invent.kde.org/network/kaidan/-/commit/77896da74745b1f9b375551d42d2b6fe3b85ab81
diff --git a/src/qml/GlobalDrawer.qml b/src/qml/GlobalDrawer.qml
index f0d1da3e9..87e4f6ee0 100644
--- a/src/qml/GlobalDrawer.qml
+++ b/src/qml/GlobalDrawer.qml
@@ -560,6 +560,16 @@ Kirigami.GlobalDrawer {
}
}
+ Connections {
+ target: MainController
+
+ function onOpenChatPageRequested(accountJid, chatJid) {
+ // Avoid focusing the formerly focused item after closing one of the views that open the chat page once completed.
+ // That maintains the focus on the message input field of the opened chat.
+ root.lastFocusedItem = null
+ }
+ }
+
Connections {
target: applicationWindow()