Fix arrows and other keys not working in sendbox
This commit is contained in:
parent
ecba7c47ec
commit
57577ba8b8
|
@ -27,7 +27,6 @@ ScrollView {
|
|||
color: HStyle.controls.textArea.background
|
||||
}
|
||||
|
||||
Keys.forwardTo: [scrollView]
|
||||
//Keys.forwardTo: [scrollView]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,8 @@ HRectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
Component.onCompleted: {
|
||||
area.Keys.onReturnPressed.connect(function (event) {
|
||||
event.accepted = true
|
||||
|
||||
if (event.modifiers & Qt.ShiftModifier ||
|
||||
|
@ -67,10 +68,10 @@ HRectangle {
|
|||
var args = [chatPage.roomId, textArea.text]
|
||||
py.callClientCoro(chatPage.userId, "send_markdown", args)
|
||||
area.clear()
|
||||
}
|
||||
})
|
||||
|
||||
// Numpad enter
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
area.Keys.onEnterPressed.connect(area.Keys.onReturnPressed)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user