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
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
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/