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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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/