Search Issue Tracker
By Design
Votes
1
Found in [Package]
2.0.1
Issue ID
1184177
Regression
No
[TMP] Text is overlapped when pasted text's line breaks are deleted
How to reproduce:
1. Open the attached '1184177-TMP-text-overlap.zip' project
2. Open 'SampleScene' scene
3. Select Text (TMP) GameObject in the Hierarchy
4. Copy and paste some text to the TMP Text field in the Inspector
5. Delete line-breaks
6. Observe the text field in the Scene View
Expected result: Pasted text is not overlapped
Actual result: Pasted text is overlapped
Reproducible with: 2017.4.32f1, 2018.4.9f1, 2019.2.7f1(TMP 1.4.0, 2.0.1), 2019.3.0b4 (TMP 1.4.0, 2.0.1), 2020.1.0a5 (TMP 1.4.0, 2.0.1)
Note: TMP for 2017.4, 2018.4 downloaded from Asset Store
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
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
Resolution Note:
The reported behavior is by design.
The original text contained both Carriage Return (CR) (\r) and Line Feed (LF) (\n). Deleting the LF leaves the CR in the text and as such since Carriage Return's function is to return the carriage to the start position of the line, the text is overwritten. Carriage Return does not add a new line.
I realize that text containing control characters (which are not visible) makes it hard to understand / decipher these types of behavior. At some point I do plan to add a mode where these control characters will be visible in the Text Input Box which should help alleviate this type of confusion.