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.
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
- Fog "Density" field dragging is too sensitive
- Webpage from example hyperlink is missing when opened in the Universal 3D sample template
- Console window loses focus of the last message when a lot of messages are shown in a row
- Shadow artifacts appear when using a merged mesh with a specific Near Plane value in the Play Mode in URP
- "TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR" error when a lot of web requests are sent within a few minutes
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);
});