Don't let click on reply steal focus from the replied to elements

member1-and-too-many-others
Nicolas Werner 5 years ago
parent 505a8b5742
commit 4d79f8078e
  1. 3
      resources/qml/MatrixText.qml
  2. 13
      resources/qml/delegates/Reply.qml

@ -22,7 +22,8 @@ TextEdit {
{ {
id: ma id: ma
anchors.fill: parent anchors.fill: parent
onPressed: mouse.accepted = false propagateComposedEvents: true
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
} }

@ -12,6 +12,13 @@ Rectangle {
width: parent.width width: parent.width
height: replyContainer.height height: replyContainer.height
MouseArea {
anchors.fill: parent
preventStealing: true
onClicked: chat.positionViewAtIndex(chat.model.idToIndex(timelineManager.replyingEvent), ListView.Contain)
cursorShape: Qt.PointingHandCursor
}
Rectangle { Rectangle {
id: colorLine id: colorLine
@ -48,10 +55,4 @@ Rectangle {
} }
color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.2) color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.2)
MouseArea {
anchors.fill: parent
onClicked: chat.positionViewAtIndex(chat.model.idToIndex(timelineManager.replyingEvent), ListView.Contain)
cursorShape: Qt.PointingHandCursor
}
} }

Loading…
Cancel
Save