[UMG] Editable Text Box OnTextCommitted event is called 3 times!

I’m making a simple chat and I’m using the editable text box OnTextCommitted event to send the message.
When I press enter to commit the text the event is called 3 times. Why?

The event blueprint:

The result (When write and press enter):

As you can see, OnTextCommitted is being called 3 times. That is insane.
In the chat box the first message is shown but the 2 following messages are empty because I’m cleaning the text box after sending the first message, so the following 2 sends an empty message.
That’s why I’m using a PrintString blueprint node just after the event fires, to show you that it’s the text box who’s actually calling the event 3 times.

You should look at the “commit method” parameter.

1 Like

Thanks @NickDarnell. I was wondering why every client (and server) was spawning an actor upon committing my input while testing with two clients. Only to find out I should have done an Enum check here. That explains a lot :slight_smile:

In case anybody is wondering:


This fixed it, thank you!

Saved my day, Thanks

I was going to spend hours scratching my head on this one. Thanks Nick!