Skip to content

Commit

Permalink
fix: unbreak handling "up" key event in multiline text
Browse files Browse the repository at this point in the history
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
  • Loading branch information
caybro committed Apr 7, 2023
1 parent c8877aa commit 05b28e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/imports/shared/status/StatusChatInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ Rectangle {
leftPadding: 0
padding: 0
Keys.onUpPressed: {
if (isEdit) {
if (isEdit && !activeFocus) {
forceActiveFocus();
} else {
if (messageInputField.length === 0) {
Expand All @@ -1254,6 +1254,7 @@ Rectangle {
if (emojiSuggestions.visible) {
emojiSuggestions.listView.decrementCurrentIndex();
}
event.accepted = false
}
Keys.onPressed: {
keyEvent = event;
Expand Down

0 comments on commit 05b28e6

Please # to comment.