Skip to content

Commit

Permalink
Remove focus after accepted or escaped signals to allow submit or rej…
Browse files Browse the repository at this point in the history
…ect changes on focus loss
  • Loading branch information
kryksyh committed Sep 24, 2024
1 parent b031fd5 commit efdc9d4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ FocusScope {
var isAcceptKey = event.key === Qt.Key_Enter || event.key === Qt.Key_Return
var isEscapeKey = event.key === Qt.Key_Escape
if (isAcceptKey || isEscapeKey) {
root.focus = false
root.textEditingFinished(valueInput.text)
}

Expand All @@ -215,6 +214,10 @@ FocusScope {
if (isEscapeKey) {
root.escaped()
}

if (isAcceptKey || isEscapeKey) {
root.focus = false
}
}

onActiveFocusChanged: {
Expand Down

0 comments on commit efdc9d4

Please sign in to comment.