diff --git a/src/qml/ExploreRoomsPage.qml b/src/qml/ExploreRoomsPage.qml index f31f0f1bd..e049208b5 100644 --- a/src/qml/ExploreRoomsPage.qml +++ b/src/qml/ExploreRoomsPage.qml @@ -89,6 +89,7 @@ SearchPage { listHeaderDelegate: Delegates.RoundedItemDelegate { onClicked: _private.openManualRoomDialog() + activeFocusOnTab: false // We handle moving to this item via up/down arrows, otherwise the tab order is wacky text: i18n("Enter a room address") icon.name: "compass" icon.width: Kirigami.Units.gridUnit * 2 diff --git a/src/qml/SearchPage.qml b/src/qml/SearchPage.qml index e80f04587..5232f07f2 100644 --- a/src/qml/SearchPage.qml +++ b/src/qml/SearchPage.qml @@ -174,5 +174,14 @@ Kirigami.ScrollablePage { anchors.centerIn: parent visible: searchField.text.length > 0 && listView.count === 0 && root.model.searching } + + Keys.onUpPressed: { + if (listView.currentIndex > 0) { + listView.decrementCurrentIndex(); + } else { + listView.currentIndex = -1; // This is so the list view doesn't appear to have two selected items + listView.headerItem.forceActiveFocus(Qt.TabFocusReason); + } + } } } diff --git a/src/qml/UserSearchPage.qml b/src/qml/UserSearchPage.qml index 83d8038b6..0714c9c98 100644 --- a/src/qml/UserSearchPage.qml +++ b/src/qml/UserSearchPage.qml @@ -41,6 +41,7 @@ SearchPage { listHeaderDelegate: Delegates.RoundedItemDelegate { onClicked: _private.openManualUserDialog() + activeFocusOnTab: false // We handle moving to this item via up/down arrows, otherwise the tab order is wacky text: i18n("Enter a user ID") icon.name: "list-add-user" icon.width: Kirigami.Units.gridUnit * 2