Search Issue Tracker

By Design

Votes

0

Found in [Package]

3.0.0-preview.14

Issue ID

1259393

Regression

No

TMP Rich text overlaps when copying text that has a carriage return symbol

Package: TextMeshPro

-

How to reproduce:
1. Open the attached project (case-1259393.zip)
2. Enter Play Mode (to see the 'TMP bug' and 'TMP good' text ASCII value comparison in the Console window)

Expected result: the GameObject 'TMP bug' Rich text is not overlapping since it looks to be identical to 'TMP good' text
Actual result: the 'TMP bug' GameObject Rich text is overlapping

Reproducible with: 0.1.2 -preview (2019.4.2f1), 1.4.1 (2018.4.24f1), 2.0.1 (2019.4.2f1), 2.1.0-preview.14 (2019.4.2f1), 3.0.0-preview.1 (2020.1.0b13, 2020.2.0a16), 3.0.0-preview.14 (2020.2.0a16)

Notes:
1. 'TMP bug' text has an extra carriage return symbol (ASCII value 13) which causes the Rich text to overlap
2. The issue occurs when copying text from a browser including a headline and a paragraph. For example, copying can be done from here: https://www.lipsum.com/
3. The same issue occurs with TMP InputField

  1. Resolution Note:

    This behavior is by design.

    The issue is related to the <CR> control character contained in the text. Carriage Return by design returns the pen position to the start of the line thus resulting in subsequent text being written on top of the existing text.

    It is common on OSX for text to contain both <CR><LF> where users end up deleting the <LF> but leaving the <CR> in the text. Since these are control characters and not visible in the text, it can be confusing to users when it happens. This is one of those text things we eventually run into / learn about :)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.