Search Issue Tracker
By Design
Votes
0
Found in
2022.3.17f1
2023.2.7f1
2023.3.0b4
Issue ID
UUM-60816
Regression
Yes
TextField's TextElement position is not updated correctly when changing the text value
How to reproduce:
1. Open the attached project "forte.zip"
2. Open Window>UI Toolkit>Debugger
3. Click Select Panel>Panel Settings in the UI Toolkit Debugger window
4. Enter Play Mode
5. Copy and paste "1234567891123456789212345678931234567894123456789512345678961234567897123456789812345678991234567890" into TextField in the Game view window
6. Press Enter
7. Select Visual Element>TemplateContainer>TextField>TextInput>TextElement in the UI Toolkit Debugger window
Expected results: "World Bound x" is "17.00"
Actual results: "World Bound x" is "-697.00"
Reproducible with: 2022.2.0a12, 2022.3.17f1, 2023.2.7f1, 2023.3.0b4
Not reproducible with: 2021.3.35f1, 2022.2.0a11
Reproducible on: Windows 10 22H2
Not reproducible on: No other environment tested
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note:
In 2022.2, the UITK went through a major refactor. More information about the said refactor can be found in the following post: https://forum.unity.com/threads/important-message-related-to-the-textfield-refactor-for-2022-1.1200559/
Simply changing `if (evt.target is TextField field)` to `if (evt.currentTarget == field)` will fix the issue.