From af408603153cb1b13c204e9e48b480f4d606f36d Mon Sep 17 00:00:00 2001 From: James Graham Date: Mon, 28 Nov 2022 18:43:52 +0000 Subject: [PATCH] Fix roompage up/down button highlights Set the focus to the chatbar after clicking the jump up/down buttons so that they don't stay highlighted. Also remove messageListView.headerItem.height as part of the down button margin calc as it no longer exists BUG: 456075 --- src/qml/Page/RoomPage.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qml/Page/RoomPage.qml b/src/qml/Page/RoomPage.qml index f3b9bfeb6..e9d9f3b99 100644 --- a/src/qml/Page/RoomPage.qml +++ b/src/qml/Page/RoomPage.qml @@ -348,6 +348,7 @@ Kirigami.ScrollablePage { visible: currentRoom && currentRoom.hasUnreadMessages && currentRoom.readMarkerLoaded action: Kirigami.Action { onTriggered: { + chatBox.focusInputField(); messageListView.goToEvent(currentRoom.readMarkerEventId) } icon.name: "go-up" @@ -360,7 +361,7 @@ Kirigami.ScrollablePage { QQC2.RoundButton { anchors.right: parent.right anchors.bottom: parent.bottom - anchors.bottomMargin: Kirigami.Units.largeSpacing + messageListView.headerItem.height + anchors.bottomMargin: Kirigami.Units.largeSpacing anchors.rightMargin: Kirigami.Units.largeSpacing implicitWidth: Kirigami.Units.gridUnit * 2 implicitHeight: Kirigami.Units.gridUnit * 2 @@ -371,6 +372,7 @@ Kirigami.ScrollablePage { visible: !messageListView.atYEnd action: Kirigami.Action { onTriggered: { + chatBox.focusInputField(); goToLastMessage(); currentRoom.markAllMessagesAsRead(); }