fix: unbreak handling "up" key event in multiline text

pressing the "down" key was working fine, the "up" key to move the
cursor to the previous line was broken

don't force the focus if it already has it and let the parent TextEdit
internals handle the event if we are not interested in it
This commit is contained in:
Lukáš Tinkl 2023-04-05 13:00:14 +02:00 committed by Lukáš Tinkl
parent c8877aaf97
commit 05b28e6f6c
1 changed files with 2 additions and 1 deletions

View File

@ -1244,7 +1244,7 @@ Rectangle {
leftPadding: 0
padding: 0
Keys.onUpPressed: {
if (isEdit) {
if (isEdit && !activeFocus) {
forceActiveFocus();
} else {
if (messageInputField.length === 0) {
@ -1254,6 +1254,7 @@ Rectangle {
if (emojiSuggestions.visible) {
emojiSuggestions.listView.decrementCurrentIndex();
}
event.accepted = false
}
Keys.onPressed: {
keyEvent = event;