TextMesh Pro InputField overwrites same line bug

Hello the following gif shows the bug. If I click behind a word it will write correctly what I type. If I click little bit far away (you see the cursor more at the right side) then suddently it will overwrite the line. Why this happens? How could I fix this?

Is this a single TMP Input Field or multiple input fields?

What version of the TMP package are you using?

Any chance you can provide me with a repro project of this? This would make it much easier to figure out why you are getting this behavior.

@Stephan_B
I use the 3.0.4 Version.
This is only one TMP Input Field. The second is top right where you see the ControlExample.

No sadly I cannot provide project.

But I noticed something. The text editor can save or load files from my computer. All files which has CRLF causes the problem

But if there is only LF then it there is no problem.

Example the line 4 does the problem ingame too but not the line 5.

Here is the example of the small code. You will see I am loading the CosSinExample in the video and there I will show line 5 and 4
y4yw85

EDIT: Yep its confirmed. If I do textContent = textContent.Replace(“\r\n”, “\n”); the problem get fixed.

Asking about the text potentially containing CR without LF at the end of the line was going to be my next pointer if you were using a single input field.

CR or Carriage Return is designed to return the caret back to the start of the line. Without a LF or Line Feed this results in the text being written on top of existing text on that line. Just like you would get on a type writer in the old days.

1 Like

What do you mean with single input field? One component or do you mean the Line Type like Multi Line Newline. If the last is yes so I am using Multi Line Newline.

So it doesn’t count as bug and should care myself about it?

Indeed I saved few content of the input field in runtime and some were written on windows itself (via notepad++).

I meant multiple text input field components.

Not a bug as the behavior is exactly how a should be have without . There are users that use for that specific functionality.

In terms of the without this is pretty common when copy pasting from web pages.