Hi,
I just updated to RC1 and now the EndEdit is calling the function whenever I press enter and whenever I deselect the input field. But I only want it to work when I press enter. I don’t want it to do anything If I deselect. Please let me know the way to distinguish between this.
According to the release notes:
- UI: Renamed InputField onSubmit to onEndEdit to avoid confusion since it’s also invoked when user clicks away from InputField.
And according to the scripting reference, there still is an OnSubmit event that you can use for submissions only. You can find it on the event trigger (funnily named “Sumbit”) through the inspector or using the ISubmitHandler on a script. I haven’t tried it, though. Give it a shot and see if it works.
Okay I will look into it
I tried it but I could not fire the OnSubmit event. I tried it with the EventTrigger component and attached a gameobject’s public function to it. But it did not fire
This result comes up on google for this question and I am still having this issue in unity 2022.3.10f1, was a solution ever found?