Search Issue Tracker
By Design
Votes
0
Found in
2023.3.0f1
Issue ID
UUM-65120
Regression
No
Cannot delayed opening context menu
It is currently not possible to open a context menu during a VisualElement.schedule.Execute(). There are some use cases where we have to delay the opening of a context menu in order to ensure mouse events and focus changed were processed.
For instance, if you want to show a context menu on a TreeView/ListView. Because on MacOS, context menus are shown on MouseDown, the ContextMenu manipulator would catch the mouse event because the TreeView/ListView, which means it would try to open a menu before the TreeView's selection is changed. In such case, one of the solution would be to delay the context menu.
Steps to reproduce:
1.
2.
3.
Actual results:
Expected results:
Reproducible with versions:
Not reproducible with versions:
Can’t test with versions:
Tested on (OS):
Notes:
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Non-multisampled texture binding errors are logged when running the DepthBlit URP scene with MSAA enabled on Vulkan
- The Editor does not recognize code errors in generic classes when using C# Source Generator to generate serialization code
- NullReferenceException is logged when undoing Deletion of a Visual Query Block of a Search Expression
- “Unsupported type MinMaxCurve” error and “Could not register property modification for animation binding…” warnings are thrown after moving playhead when Particle System Property is added to Animation window
- Nested LocalizedStrings can not query local variables
Resolution Note:
This is as designed. The contextual menu event needs to be tied to a pointer event, so it needs to happen right away.
Any alternate logic can be done in scheduled items by creating a DropdownMenu manually instead of using events.