summary refs log tree commit diff
path: root/resources/qml/MessageInput.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/MessageInput.qml')
-rw-r--r--resources/qml/MessageInput.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml

index 3b424bb3..b76a44f3 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml
@@ -58,9 +58,14 @@ Rectangle { onSelectionStartChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text) onSelectionEndChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text) + Connections { + target: TimelineManager.timeline.input + function onInsertText(text_) { textArea.insert(textArea.cursorPosition, text_); } + } + Keys.onPressed: { if (event.matches(StandardKey.Paste)) { - TimelineManager.timeline.input.paste(false) || textArea.paste() + TimelineManager.timeline.input.paste(false) event.accepted = true } else if (event.matches(StandardKey.InsertParagraphSeparator)) { @@ -75,7 +80,7 @@ Rectangle { anchors.fill: parent acceptedButtons: Qt.MiddleButton cursorShape: Qt.IBeamCursor - onClicked: TimelineManager.timeline.input.paste(true) || textArea.paste() + onClicked: TimelineManager.timeline.input.paste(true) } background: Rectangle {