View Issue Details

IDProjectCategoryView StatusLast Update
0002437NoesisGUIC++ SDKpublic2022-11-18 10:08
Reportertsilmer Assigned Tosfernandez  
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.1.5 
Target Version3.1.6Fixed in Version3.1.6 
Summary0002437: ContextMenu Placement intermittently not being respected
DescriptionWe are running into a weird intermittent issue with the placement of ContextMenus. Sometimes when we open our app, the ContextMenuService.PlacementTarget and ContextMenuService.Placement properties that we set in a element is not respected and the ContextMenu is instead always placed at the mouse cursor position. The issue is intermittent though, so sometimes it works as expected and sometimes it does not, it only happens when we open the app, if we open the app and it works once then it always works and vice versa.

More details on this forum thread: https://www.noesisengine.com/forums/viewtopic.php?t=2734
TagsNo tags attached.
PlatformAny

Activities

sfernandez

sfernandez

2022-10-18 10:11

manager   ~0008104

Could you please try with the following patch:

Index: ContextMenu.cpp
===================================================================
--- ContextMenu.cpp	(revision 11643)
+++ ContextMenu.cpp	(working copy)
@@ -159,14 +159,6 @@
         // Set node parent
         ParentClass::SetNodeParent(parent);
 
-        // Update context menu placement
-        CoerceValue<bool>(HasDropShadowProperty);
-        CoerceValue<float>(HorizontalOffsetProperty);
-        CoerceValue<PlacementMode>(PlacementProperty);
-        CoerceValue<Rect>(PlacementRectangleProperty);
-        CoerceValue<Ptr<UIElement>>(PlacementTargetProperty);
-        CoerceValue<float>(VerticalOffsetProperty);
-
         // Notify menu items
         MenuItem::SetIsInsideContextMenu(this, parent != 0);
     }
@@ -418,7 +410,13 @@
         mPopupInternal->SetChild(this);
         mPopupInternal->Bind(this);
 
+        // Update context menu placement
+        CoerceValue<bool>(HasDropShadowProperty);
+        CoerceValue<float>(HorizontalOffsetProperty);
+        CoerceValue<PlacementMode>(PlacementProperty);
+        CoerceValue<Rect>(PlacementRectangleProperty);
         CoerceValue<Ptr<UIElement>>(PlacementTargetProperty);
+        CoerceValue<float>(VerticalOffsetProperty);
 
         Mouse* mouse = GetMouse();
         mMenuCapture = DynamicCast<Menu*>(mouse->GetCaptured());
sfernandez

sfernandez

2022-11-08 11:22

manager   ~0008147

Hello, did you find time to try the mentioned patch? We want to include this in the following 3.1.6 release that is coming by the end of this week.

Issue History

Date Modified Username Field Change
2022-10-04 01:23 tsilmer New Issue
2022-10-10 12:47 sfernandez Assigned To => sfernandez
2022-10-10 12:47 sfernandez Status new => assigned
2022-10-10 12:47 sfernandez Target Version => 3.1.6
2022-10-18 10:11 sfernandez Status assigned => feedback
2022-10-18 10:11 sfernandez Note Added: 0008104
2022-11-07 17:13 sfernandez Target Version 3.1.6 => 3.1.7
2022-11-07 17:18 sfernandez Target Version 3.1.7 => 3.1.6
2022-11-08 11:22 sfernandez Note Added: 0008147
2022-11-18 10:08 sfernandez Status feedback => resolved
2022-11-18 10:08 sfernandez Resolution open => fixed
2022-11-18 10:08 sfernandez Fixed in Version => 3.1.6