Auto-focus OK only for ClearMessagesPopup
This commit is contained in:
parent
7f995c749f
commit
9f8ac6ca9f
|
@ -95,7 +95,7 @@ Rectangle {
|
|||
true : modelData.enabled) &&
|
||||
! button.loading
|
||||
|
||||
onClicked: buttonCallbacks[modelData.name](button)
|
||||
onClicked: buttonCallbacks[name](button)
|
||||
|
||||
Keys.onLeftPressed: previous.forceActiveFocus()
|
||||
Keys.onUpPressed: previous.forceActiveFocus()
|
||||
|
@ -105,7 +105,7 @@ Rectangle {
|
|||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
|
||||
Component.onCompleted:
|
||||
if (modelData.name == focusButton) forceActiveFocus()
|
||||
if (name == focusButton) forceActiveFocus()
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: theme.baseElementsHeight
|
||||
|
|
|
@ -18,7 +18,6 @@ HPopup {
|
|||
property bool okEnabled: true
|
||||
|
||||
|
||||
box.focusButton: "ok"
|
||||
box.clickButtonOnEnter: "ok"
|
||||
box.buttonModel: [
|
||||
{ name: "ok", text: okText, iconName: "ok" , enabled: okEnabled},
|
||||
|
|
|
@ -7,6 +7,7 @@ HBoxPopup {
|
|||
"The messages will only be removed on your side. " +
|
||||
"They will be available again after you restart the application."
|
||||
)
|
||||
box.focusButton: "ok"
|
||||
|
||||
onOk: py.callClientCoro(userId, "clear_events", [roomId])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user