Annoyances with TMP_InputField


working a bit more with multiline TMP_InputFields I noticed some flaws, and I wonder if there are fixes for them, or if they are worked on.

For example, clicking a tiny bit more quickly than super precise while hovering an area next to text always selects the last character of the line, instead of just placing the caret. I wish it would be less sensible in this regard.

Second, the scrollbar does not react to empty lines, even with whitespaces. Meaning, if you create a new line, the vertical scrollbar does not recognize the actual bounds of the input field - only if you begin to type a non-whitespace character.

7896589--1005706--Desktop 14-02-2022 21-20-22.gif

Here’s hoping this will get an reply or even fix some day.

Also getting a lot of errors when resizing the TMP_InputField (with a scrollbar) dynamically (on the X axis):

“Trying to add Handle (UnityEngine.UI.Image) for graphic rebuild while we are already inside a graphic rebuild loop. This is not supported.”

What version of the TMP package are you using? Please test the latest preview release for the version of Unity you are using. That would be either version 2.2.0-pre.2 for Unity 2019.4 or version 3.2.0-pre.2 for Unity 2020 or newer. These new release include the preserver whitespace support which should behave better with respect to whitespaces.

I would also suggest check how the scrollbar is handled in the example scene included with TMP to make sure your setup mirrors that.

Let me know if any of the above helps. If, not can you please submit a bug report with the simple scene you are using above.

Thanks for the reply. I already had the latest preview release for my Unity 2020.3.25. I also checked out the example scene and it has the same problems and errors as described above. For example, creating empty new lines at the end of the text does not change the scroll bar's handle even thought it should. And as soon as I resize the input field on the x axis (via the inspector or the manipulator tool) while the scroll bar is present - errors gets spawn.

I sent a bug report. Case number is 1408532.

1 Like

I can’t believe the problem with the scrollbar (it’s wrong when only having whitespace at the bottom of the input field) is still not fixed (Unity 2022.3.14f1)

How many years will I have to wait for a fix for this bug?