Search Issue Tracker
Fixed in 2020.2.X
Fixed in 2020.1.X
Votes
7
Found in
2019.1
2019.2
2019.3
2019.3.0f1
2020.1
Issue ID
1206181
Regression
No
UIElements TextField is not focused and you are not able to type in characters when using Focus() method
How to reproduce:
1. Open the attached 'project-1206181.zip' project
2. In the Editor select 'Bug' > 'Bug'
3. Try to type in any characters
Expected result: the text field is focused, you are able to type in characters
Actual result: the text field is NOT focused, you are NOT able to type in characters
Reproducible with: 2019.1.0a8, 2019.1.14f1, 2019.2.17f1, 2019.3.0f4, 2020.1.0a17
Could not test with: 2019.1.0a7 and earlier (Due to script errors)
Workaround for the issue: instead of using textField.Focus() use textField.Q("unity-text-input").Focus()
-
icepower2012
Sep 10, 2020 08:04
try this:
textField[0].Focus(); -
Illumina33
Mar 18, 2020 17:42
This is also occurring for us. The only workaround that has worked for me so far is to synthesize MouseDown and MouseUp events onto the field.
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
- [HDRP] Recursive rendering refraction is very different compared to Rasterization/PathTracing
- [VFX] SMR sampling first frame after culling in T-Pose
- Can't select color from Editor with color picker when Unity Editor is on Secondary monitor
- [Linux] "Error while reading movie" errors in Learning templates due to unsupported .mov video format
- [Android] Crash with Signal 11 when opening app from floating icon state
Resolution Note (fix version 2020.2):
Fixed in 2021.1.0a2
Resolution Note (fix version 2020.2):
Fixed in 2020.2.4f1