When you create InputField, set line type to “Multi Line Submit” and in game write something and press enter, text is submited. When you reselect InputField no new line is added. This is expected behaviour. I would expect same behaviour with TMP_InputField. Difference is that when you press enter in TMP_InputField, after the text is submited, new line is added to the text so when you reselect the TMP_InputField, message with new line is in the text field. After submiting the text I am clearing the text field, but because new line is added after the submit, I end up with empty text field with added new line so the placeholder text is not visible anymore.
It seems like a bug and I couldn’t find anyone reporting this so I am making a new thread.
Tested with TMP version 3.0.6
3 Likes
Same bug with old InputField in Unity 2022.3 LTS
1 Like
assuming this is not due to some misconfig, and if upgrading is not an option, you could use TMP_InputField.OnChangeEvent to intercept the new-line char and submit it manually. see change log for any TMPro versions newer than yours and consider updating if you can afford retesting the whole app
How do we know upgrading will fix it? Which version was it fixed in?
1 Like