mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
emojier: go back to search field on Arrow Up
Arrow Down from the search field goes to the main gridView, but Arrow Up from there doesn't go back. Our previous implementation using KeyNavigation broke during refactoring, and was half-replaced. Instead, fix the KeyNavigation, and make the handover pattern a bit more obvious with a comment (similar to how we have them in a couple of other places)
This commit is contained in:
parent
4e40c3e179
commit
0fe4c7170d
1 changed files with 4 additions and 4 deletions
|
|
@ -75,13 +75,13 @@ Kirigami.ScrollablePage {
|
|||
Keys.onReturnPressed: event => emojiView.currentItem?.Keys.returnPressed(event)
|
||||
Keys.onDownPressed: event => {
|
||||
emojiView.currentIndex = Math.max(emojiView.currentIndex, 0)
|
||||
event.accepted = false
|
||||
emojiView.forceActiveFocus(Qt.TabFocusReason)
|
||||
event.accepted = false // pass to KeyNavigation
|
||||
}
|
||||
KeyNavigation.down: emojiView
|
||||
|
||||
Binding {
|
||||
view.Keys.forwardTo: [searchField]
|
||||
view.KeyNavigation.up: searchField.KeyNavigation.down // explicitly set as this and clear button point there
|
||||
emojiView.KeyNavigation.up: searchField
|
||||
}
|
||||
Connections {
|
||||
target: view
|
||||
|
|
@ -383,7 +383,7 @@ Kirigami.ScrollablePage {
|
|||
if (currentIndex < columnsToHave - 1) {
|
||||
currentIndex = -1
|
||||
}
|
||||
event.accepted = false
|
||||
event.accepted = false // pass to ListView or KeyNavigation.up, bound from header
|
||||
}
|
||||
|
||||
delegate: emojiDelegateComponent
|
||||
|
|
|
|||
Loading…
Reference in a new issue