Focus filter field on member profile exit

This commit is contained in:
miruka 2020-09-13 19:16:46 -04:00
parent 9b1608b696
commit fb846226f8
2 changed files with 9 additions and 2 deletions

View File

@ -16,6 +16,7 @@ HListView {
property int canSetPowerLevels
property QtObject member // RoomMember model item
property HStackView stackView
property Item focusOnExit
property bool powerLevelFieldFocused: false
@ -31,6 +32,11 @@ HListView {
})
}
function exit() {
stackView.pop()
focusOnExit.forceActiveFocus()
}
clip: true
bottomMargin: theme.spacing
@ -79,7 +85,7 @@ HListView {
circle: true
icon.name: "close-view"
iconItem.small: true
onClicked: root.stackView.pop()
onClicked: root.exit()
}
}
@ -297,7 +303,7 @@ HListView {
currentItem.leftClicked()
currentItem.clicked()
}
Keys.onEscapePressed: stackView.pop()
Keys.onEscapePressed: root.exit()
Connections {
target: py.eventHandlers

View File

@ -52,6 +52,7 @@ HColumnLayout {
),
member: model,
stackView: stackView,
focusOnExit: filterField,
},
)
}