From a738c3566790c6e9abeea3c4c3dacfceaa82f66a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 20 Jan 2021 14:13:44 +0100 Subject: Ensure we cancel touchMouseSynthesis upon receiving touchCancel As it stood, we wouldn't cancel touchMouseSynthesis after receiving a touch cancel event. The result would be that the first touch event sent to QQuickWindow thereafter would have touchMouseId set to value different from -1. This again would fool QQuickWindow into believing that the event belonged to a touch event it has synthesized before, and it would as such take a different/wrong path for delivery. This caused text selection to fail on iOS, since a press-and-hold on a line edit from QPA would cancel the touch event and show a magnifier glass. When the user later touched inside the line edit again to move the cursor, this new touch event would not be delivered to the text edit. Pick-to: 6.0 Fixes: QTBUG-90485 Change-Id: Iad640ae57317ea86ee68ca053654b0b30ade003a Reviewed-by: Shawn Rutledge --- src/quick/items/qquickwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 446573aae8..ccacc5d5a6 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2291,7 +2291,7 @@ bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event) // Deliver it to all items and handlers that have active touches. const_cast(QPointingDevicePrivate::get(event->pointingDevice()))-> sendTouchCancelEvent(event); - + cancelTouchMouseSynthesis(); return true; } -- cgit v1.2.3