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
- Color picker values remain the same when pressing ctrl + z to undo the changed values
- Name of the Material in the Material Hierarchy Popup window is cut off
- Editor freezes on "Reloading Domain" when initiating a Domain Reload in a specific project
- The camera's Gizmos frustum does not display correctly when there is a script containing the OnGUI method
- "InvalidOperationException" and additional errors throw in the Console window when using a custom Composite
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/