Compare commits

...

1 Commits

3 changed files with 13 additions and 10 deletions

View File

@@ -28,6 +28,14 @@ TimelineContainer {
Layout.fillWidth: true Layout.fillWidth: true
messageId: model.eventId messageId: model.eventId
visible: currentRoom.chatBoxEditId === model.eventId visible: currentRoom.chatBoxEditId === model.eventId
onVisibleChanged: {
if (visible) {
editChatDocumentHandler.document = textDocument
editChatDocumentHandler.cursorPosition = cursorPosition
editChatDocumentHandler.selectionStart = selectionStart
editChatDocumentHandler.selectionEnd = selectionEnd
}
}
} }
LinkPreviewDelegate { LinkPreviewDelegate {
Layout.fillWidth: true Layout.fillWidth: true

View File

@@ -124,16 +124,6 @@ QQC2.TextArea {
} }
} }
ChatDocumentHandler {
id: documentHandler
isEdit: true
document: root.textDocument
cursorPosition: root.cursorPosition
selectionStart: root.selectionStart
selectionEnd: root.selectionEnd
room: currentRoom // We don't care about saving for edits so this is OK.
}
TextMetrics { TextMetrics {
id: editTextMetrics id: editTextMetrics
text: root.text text: root.text

View File

@@ -26,6 +26,11 @@ Kirigami.ScrollablePage {
/// cancel implementation. /// cancel implementation.
property bool disableCancelShortcut: false property bool disableCancelShortcut: false
property var editChatDocumentHandler: ChatDocumentHandler {
isEdit: true
room: currentRoom // We don't care about saving for edits so this is OK.
}
title: currentRoom.displayName title: currentRoom.displayName
KeyNavigation.left: pageStack.get(0) KeyNavigation.left: pageStack.get(0)