[StatusChatInput]: fixed focus and reply component lost
- Fixed reply message is gone when adding image - Fixed pressing up arrow key when editing loses the cursor Closes #9419 Closes #9139
This commit is contained in:
parent
2fb158b810
commit
c31903d281
|
@ -357,10 +357,6 @@ Rectangle {
|
||||||
} else if (event.key === Qt.Key_Escape && control.isReply) {
|
} else if (event.key === Qt.Key_Escape && control.isReply) {
|
||||||
control.isReply = false
|
control.isReply = false
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
} else if (event.key === Qt.Key_Up && messageInputField.length === 0) {
|
|
||||||
event.accepted = true
|
|
||||||
control.keyUpPress()
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const symbolPressed = event.text.length > 0 &&
|
const symbolPressed = event.text.length > 0 &&
|
||||||
|
@ -887,7 +883,6 @@ Rectangle {
|
||||||
|
|
||||||
function showImageArea(imagePathsOrData) {
|
function showImageArea(imagePathsOrData) {
|
||||||
isImage = true;
|
isImage = true;
|
||||||
isReply = false;
|
|
||||||
|
|
||||||
imageArea.imageSource = imagePathsOrData
|
imageArea.imageSource = imagePathsOrData
|
||||||
control.fileUrlsAndSources = imageArea.imageSource
|
control.fileUrlsAndSources = imageArea.imageSource
|
||||||
|
@ -1245,6 +1240,18 @@ Rectangle {
|
||||||
bottomPadding: 9
|
bottomPadding: 9
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
padding: 0
|
padding: 0
|
||||||
|
Keys.onUpPressed: {
|
||||||
|
if (isEdit) {
|
||||||
|
forceActiveFocus();
|
||||||
|
} else {
|
||||||
|
if (messageInputField.length === 0) {
|
||||||
|
control.keyUpPress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (emojiSuggestions.visible) {
|
||||||
|
emojiSuggestions.listView.decrementCurrentIndex();
|
||||||
|
}
|
||||||
|
}
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
keyEvent = event;
|
keyEvent = event;
|
||||||
onKeyPress(event)
|
onKeyPress(event)
|
||||||
|
|
Loading…
Reference in New Issue