aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquicktextcontrol.cpp')
-rw-r--r--src/quick/items/qquicktextcontrol.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp
index af3f509f5b..dc61b36d4e 100644
--- a/src/quick/items/qquicktextcontrol.cpp
+++ b/src/quick/items/qquicktextcontrol.cpp
@@ -974,7 +974,7 @@ void QQuickTextControlPrivate::mousePressEvent(QMouseEvent *e, const QPointF &po
{
Q_Q(QQuickTextControl);
- mousePressed = (interactionFlags & Qt::TextSelectableByMouse);
+ mousePressed = (interactionFlags & Qt::TextSelectableByMouse) && (e->button() & Qt::LeftButton);
mousePressPos = pos.toPoint();
if (sendMouseEventToInputContext(e, pos))
@@ -989,7 +989,9 @@ void QQuickTextControlPrivate::mousePressEvent(QMouseEvent *e, const QPointF &po
cursor.clearSelection();
}
}
- if (!(e->button() & Qt::LeftButton)) {
+ if (e->button() & Qt::MiddleButton) {
+ return;
+ } else if (!(e->button() & Qt::LeftButton)) {
e->ignore();
return;
} else if (!(interactionFlags & (Qt::TextSelectableByMouse | Qt::TextEditable))) {