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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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);
});