From 05b28e6f6cfd583cccf23530d9753ef54708f0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Wed, 5 Apr 2023 13:00:14 +0200 Subject: [PATCH] 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 --- ui/imports/shared/status/StatusChatInput.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index 6db64dd0c1..ae9b7ff8be 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -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;