Search Issue Tracker
By Design
Votes
4
Found in
2021.3.45f1
2022.3.53f1
6000.0.30f1
6000.1.0a7
Issue ID
UUM-90163
Regression
No
RegisterValueChangedCallback is triggered when the Label of a TextField is changed
Reproduction steps:
1. Open the attached “IN-90051” project
2. Open the “Scenes/SampleScene” Scene
3. Enter the Play Mode
4. Check the Checkbox in the Game View
5. Observe the Console window
Expected result: No logs are printed
Actual result: Logs that the Input value has changed are printed
Reproducible with: 2021.3.45f1, 2022.3.53f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: Windows 10
Not reproducible on: No other environments tested
Comments (1)
-
kminko
Feb 07, 2025 12:02
But target and currentTarget properties in event triggered by label always points to TextField (2021.3.0f1).
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
- "Errors during XML parse" warnings are thrown when building project for the Android platform
- Shader transparency, discard, and clip are not working when using the Player
- Error is thrown when clicking on warning in the console
- Long IL2CPP build time when project has a .ufbx library wrapper
- Cursor doesn't change to the resizing when using the Rect Tool and the Sprite is too close to the bottom of the Scene View
Resolution Note:
This is by design. The RegisterValueChangedCallback is a utility method over RegisterCallback specifically for ChangeEvent<T>. Change events will trickle down and bubble up, which is why you can receive a change event on the Label of a TextField.
To ensure that you are only consuming the events from the TextField, you must filter the event using the target property.