Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.2, 5.15.6, 6.1.3, 6.2.0 Beta3
Description
Observation
TapHandler with Passive Grab does not trigger MouseArea Click. The TapHandler is wrapped in an item to ensure it's an Item sibling of the MouseArea and both are overlapping.
Expectation
Because the TapHandler creates only a passive grab, I've expected to get the CLICKED log entry.
Code
Item { anchors.fill: parent MouseArea { objectName: "mouseArea" anchors.fill: parent onClicked: () => console.log("CLICKED"); } Item { objectName: "handlerContainer" anchors.fill: parent TapHandler { objectName: "tapHandler" gesturePolicy: TapHandler.DragThreshold onTapped: () => console.log("TAP"); } } }
qt.quick.handler.dispatch: "tapHandler" checking device type QFlags<QInputDevice::DeviceType>(AllDevices) pointer type QFlags<QPointingDevice::PointerType>(AllPointerTypes) modifiers QFlags<Qt::KeyboardModifier>(KeyboardModifierMask) qt.quick.handler.dispatch: QQuickTapHandler "tapHandler" on QQuickItem "handlerContainer" WANTS QMouseEvent(MouseButtonPress LeftButton pos=18,287 scn=18,287 gbl=-1141,394 dev=QPointingDevice("core pointer" Mouse id=1)) qt.quick.handler.tap: "tapHandler" pressed false -> true QEventPoint(id=0 ts=5805 pos=18,287 scn=18,287 gbl=-1141,394 Pressed vel=24.0964,-7.98291 press=18,287 last=18,287 ? 0,0) gp QQuickTapHandler::DragThreshold qt.quick.handler.grab: QQuickTapHandler(0x163dca07ea0, name = "tapHandler") QEventPoint(id=0 ts=5805 pos=18,287 scn=18,287 gbl=-1141,394 Pressed vel=24.0964,-7.98291 press=18,287 last=18,287 ? 0,0) true via QQuickDeliveryAgent(root=QQuickRootItem) qt.quick.handler.grab: QEventPoint(id=0 ts=5805 pos=18,287 scn=18,287 gbl=-1141,394 Pressed vel=24.0964,-7.98291 press=18,287 last=18,287 ? 0,0) QPointingDevice::GrabPassive QQuickTapHandler(0x163dca07ea0, name = "tapHandler") qt.quick.mouse: QQuickDeliveryAgent(root=QQuickRootItem) QMouseEvent(MouseButtonRelease LeftButton pos=18,287 scn=18,287 gbl=-1141,394 dev=QPointingDevice("core pointer" Mouse id=1)) qt.quick.handler.dispatch: "tapHandler" checking device type QFlags<QInputDevice::DeviceType>(AllDevices) pointer type QFlags<QPointingDevice::PointerType>(AllPointerTypes) modifiers QFlags<Qt::KeyboardModifier>(KeyboardModifierMask) qt.quick.handler.dispatch: QQuickTapHandler "tapHandler" on QQuickItem "handlerContainer" WANTS QMouseEvent(MouseButtonRelease LeftButton pos=18,287 scn=18,287 gbl=-1141,394 dev=QPointingDevice("core pointer" Mouse id=1)) qt.quick.handler.tap: "tapHandler" pressed true -> false QEventPoint(id=0 ts=5884 pos=18,287 scn=18,287 gbl=-1141,394 Released vel=7.22891,-2.39487 press=18,287 last=18,287 ? 0,0) gp QQuickTapHandler::DragThreshold qt.quick.handler.tap: "tapHandler" tapped 1 times qml: TAP qt.quick.handler.grab: QEventPoint(id=0 ts=5884 pos=18,287 scn=18,287 gbl=-1141,394 Released vel=7.22891,-2.39487 press=18,287 last=18,287 ? 0,0) QPointingDevice::UngrabPassive QQuickTapHandler(0x163dca07ea0, name = "tapHandler")
Notes
- Enable "false" on the TapHandler makes the MouseArea react again
- TapHandler without Item container does not work (only MouseArea active then) (qt.quick.handler.dispatch: QQuickTapHandler "tapHandler" on QQuickItem "" DECLINES QMouseEvent(...))
- onPressed on MouseArea is not working as well
Attachments
Issue Links
- duplicates
-
QTBUG-68099 make it possible to press a TapHandler and a MouseArea at the same time
- Reported
- relates to
-
QTBUG-73262 it's confusing that TapHandler.gesturePolicy affects event propagation
- Reported
-
QTBUG-96050 TapHandler PassiveGrab prohibits event propagation to Button click
- Reported
-
QTBUG-70397 TapHandler fires for all overlapping items
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-96030 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
369785,2 | WIP test MouseArea under item with TapHandler | dev | qt/qtdeclarative | Status: NEW | -2 | 0 |
385031,2 | WIP PointerHandler: add acceptsEvents property | dev | qt/qtdeclarative | Status: ABANDONED | -2 | 0 |