Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4
2019.4.14f1
2021.1
Issue ID
1291482
Regression
No
[Windows] PopupField incorrectly calls MouseLeaveEvent when being closed after changing value
Reproduction steps:
1. Open user attached Project "UnityBugMouseLeaveEvent"
2. Open "Assets/Scenes/SampleScene"
3. Select GameObject and change the value in the MyScript Visual Element PopupField
Expected result: The value is changed and logged in the Console
Actual result: MouseLeaveEvent is called, cancelling the callback that logs the value
Reproducible with: 2019.4.16f1, 2020.1.16f1, 2020.2.0b14, 2021.1.0a8
Could not test with: 2018.4 (Compiler errors)
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
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
- Editor crashes on D3D12GetInterface when repeatedly enabling and disabling 256 text components
- Flickering bright white dots in the Scene when the Android Platform is selected and DX11 Graphics API is used with Iris(R) Xe Graphics GPU
- Inconsistent capitalization and misaligned text in multiple query blocks in Search window
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
Resolution Note (2021.1.X):
At the moment, mouse leave events are sent when a popup menu is open because this is an OS dialog. From the point of view of the Unity application there is no difference between the mouse leaving the window or mouse now being over an OS menu, in both cases it will receive a mouse leave event.
I understand this might no be convenient but a mouse enter event will be sent right after which should correct most situations.
It looks like you are trying to re-create the entire UI in mouse enter events which causes this behaviour to be more annoying to you than it should be.
I would recommend having a look at data binding used within an custom Editor:
https://docs.unity3d.com/ScriptReference/Editor.html
Or ask for some help on our forum section:
https://forum.unity.com/forums/ui-toolkit.178/