How to reproduce:
- Open any Unity project with TextMeshPro 3.0.6 on macOS
- Create new TMPro InputField in any scene [UI / InputField - TextMeshPro] and run Play-mode
- Select the input field
- Press Esc key
In my case it produces two actions: putting a square (□) character into the field and deselecting it.
Why did this happen?
macOS produces more than one event at pressing Esc key down. And TMP_InputField handle each event: first is about escaping from the field editing mode and the second is about reading a character with \u001B code (which is an Esc button’s code).
How I temporary solved it?
I’ve just added a breaking of a while-loop inside OnUpdateSelected() method in TMP_InputField.cs when
isFocused field equal false.