Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.0
-
None
-
macOs Ventura 13.6.6, MacBook Pro 2017, 15'', with Touch Bar
Description
Good day,
I am trying to prevent an Item from being dragged through a Menu when the Menu is open. Currently, when the Item is dragged over the Menu, it can be dragged through the Menu's background, which is not the intended behavior.
While trying different approaches to make it work, I noticed that if I add `dragHandler` to `background` and set it `target` to `null` and for `grabPermissions` to PointHandler.TakeOverForbidden, this will work with QtQuick.Controls Popup, but not QtQuick.Controls Menu, although the Menu is inherited from the Popup, but the behavior is different from the Menu.
Minimum reproduction code contains two Rectangles with DragHandlers `grabPermissions` set to `PointHandler.CanTakeOverFromItems` and `TabHandler` to show Menu or Popup. Menu and Popup has DragHandler inside their backgrounds, and `grabPermissions` are set to `PointHandler.TakeOverForbidden` to prevent any propagation of events. Right clicking on red rectangle will show the Menu with MenuItems in it, and right clicking on purple Rectangle will show the Popup.
While Menu is visible is still possible to drag the red Rectangle underneath by dragging over the MenuItems, but while Popup is visible dragging is blocked, expected behavior.
My question will be why is the behavior is different even though Menu is a Popup?
P.S.: Added QML file with minimum reproduction code and screen recording.