You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Note, the MouseRegion inserted in src/controls/flyouts/menu.dart does not consider the translation of the nested Navigator, causing the test for whether the cursor is on the submenu item to always fail and the submenu to close whenever the mouse moves. I used this dirty fix to get around that:
// ...if (keys.isNotEmpty) {
content =MouseRegion(
onHover: (event) {
for (final subItem
in keys.whereType<GlobalKey<_MenuFlyoutSubItemState>>()) {
final state = subItem.currentState;
if (state ==null|| subItem.currentContext ==null) continue;
if (!state.isShowing(menuInfo)) continue;
final itemBox =
subItem.currentContext!.findRenderObject() asRenderBox;
final b= (parent?.widget.root?.context.findRenderObject() asRenderBox);
final translation = b.getTransformTo(null).getTranslation();
final offset =Offset(translation[0], translation[1]);
final itemRect = (itemBox.localToGlobal(
Offset.zero,
ancestor: parent?.widget.root?.context.findRenderObject(),
) + offset) &
itemBox.size;
if (!itemRect.contains(event.position)) {
state.close(menuInfo);
}
}
},
child: content,
);
}
// ...
The text was updated successfully, but these errors were encountered:
It looks like you integrated the workaround for the unrelated mouse movement issue, but the actual issue seems to not have been addressed, at least with 4.9.2 the menu in the provided example still disappears behind the blue layer and can't be scrolled.
When running the following example (*), the submenu does not respect its parent container's dimensions:
* Note, the
MouseRegion
inserted in src/controls/flyouts/menu.dart does not consider the translation of the nestedNavigator
, causing the test for whether the cursor is on the submenu item to always fail and the submenu to close whenever the mouse moves. I used this dirty fix to get around that:The text was updated successfully, but these errors were encountered: