Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0b7
Issue ID
963890
Regression
No
Text Mesh Pro Input Caret resets to wrong position
The TextMesh Pro InputField caret resets to the wrong position with specific settings on the text viewport's pivot.
To reproduce:
1. Download attached project + Open Main Scene
2. Enter Play mode
3. Deselect + reselect both text field's
Notice how the alignment of the caret fails on the second text field.
Seems to be being cause by the object 'InputField_NotWorking' having its pivot set to (0.5, 1.0). Setting the pivot to (0.5, 0.5) makes it work correctly.
Comments (1)
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
- Texture generator reference image fails despite valid size
- Agent mode can enter infinite execution loop
- AI Gateway responses contain duplicated sentences
- Texture 2D asset is created when promoting a generated Cubemap to a new asset
- Unable to copy multiple paragraphs from Assistant responses
NickMcCo
Apr 04, 2018 00:21
I am still having this issue, maybe I'm using an old version of textmeshpro or something. Anyway, for future googlers, this is how I solved the problem:
UsernameField.onSelect.AddListener(i => {
var rect = UsernameField.GetComponentInChildren<TMP_SelectionCaret>().rectTransform;
rect.anchoredPosition =
new Vector2(-(rect.rect.width/2), rect.anchoredPosition.y);
});