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
- GameObjects change Hierarchy order when undoing adding Component to multiple GameObjects
- [macOS] Editor crashes after entering Play mode with overlapping GameObjects with Cloth Component and Cloth Inter-Collision enabled
- Look Dev constantly regenerates the default Volume Profile when set to "None" instead of using the default one
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
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/