Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.4, 6.5.3, 6.7.2, 6.8.0 Beta3
-
None
-
a6e196ce9 (dev), ae7069bfa (6.5), dd3484343 (6.5.0), b0bb5823e (6.4), a8fb5c36c (tqtc/lts-6.2)
Description
DragHandler propagates tap event through Flickable/ListView to underlying TapHandler.
Code example:
import QtQuick import QtQuick.Layouts Window { id: window width: 640 height: 480 visible: true Rectangle { id: mainRect anchors.fill: parent TapHandler { onTapped: { mainRect.color = Qt.rgba(Math.random(), Math.random(), Math.random(), 1) console.log("Tapped") } } } Flickable { id: flickable anchors { fill: parent leftMargin: 50 rightMargin: 50 } contentWidth: content.implicitWidth contentHeight: content.implicitHeight ColumnLayout { id: content width: flickable.width Rectangle { Layout.fillWidth: true height: window.height / 2 + 100 border.width: 1 color: 'red' DragHandler { onActiveChanged: console.log("Drag active: " + active) } } Rectangle { Layout.fillWidth: true height: window.height / 2 + 100 border.width: 1 color: 'blue' } } } }
Steps to reproduce:
click on "red" rectangle (flickable's child with DragHandler inside)
Actual results:
tap event is propagated to underlying rectangle (id: mainRect), see console output
Expected result:
tap event is NOT propagated to underlying rectangle (id: mainRect), i.e. the behavior should be
the same as for "blue" rectangle (flickable's child without DragHandler inside)
Note:
in the example above, if we drop Flickable from there, the behavior for "red" and "blue" rectangle
will be identical. both will propagate tap event to underlying rectangle with TapHandler.
Attachments
Issue Links
- relates to
-
QTBUG-70397 TapHandler fires for all overlapping items
- Reported
-
QTBUG-100534 TapHandler doesn't stop propagation
- Reported
-
QTBUG-74842 Flickable behind MouseArea does not steal first drag event after creation
- Closed
-
QTBUG-38765 When propagateComposedEvents is set, drag does not always move the flickable
- Closed
-
QTBUG-87815 DragHandler events are caught through popups
- Open
-
QTBUG-108896 [REG 6.2.4-6.3.2] Using PinchHandler for Flickable's child makes the Flickable transparent for touch events
- Closed