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
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
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.