Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.1
-
None
Description
Different Pointer Handler combinations with Popup can "pass through" events. Example:
import QtQuick import QtQuick.Window import QtQuick.Controls ApplicationWindow { width: 800 height: 600 visible: true Rectangle { width: 200 height: 30 color: "yellow" Text { text: "Destroy World" } TapHandler { onTapped: console.log("BOOM"); } } Popup { id: popup x: 50 width: 100 height: 100 modal: true focus: true Component.onCompleted: { popup.open(); } Rectangle { width: 80 height: 30 color: "green" Text { text: "Do someting" } TapHandler { onTapped: console.log("ok"); } } // Rectangle { // width: 80 // height: 30 // color: "green" // DragHandler {} // } } }
In this example both onTapped will be triggered. I know that it can be solved with TapHandler.ReleaseWithinBounds, but it is hack that works in only this specific case and only if I control all the TapHandlers. And if I need to use other gesturePolicy, then it wont work.
Also event is passed through if there is DragHandler in popup.
This is very dangerous and makes PointerHandlers useless.
Please implement Item.modal feature ASAP QTBUG-68103
Attachments
Issue Links
- is cloned by
-
QTBUG-124249 TapHandler catches tap event below modal popup
-
- Reported
-