UEditableTextBox's OnTextCommitted Problem

[Content removed]

I applied the CL: 44285527 you mentioned in the issue.

The problem was resolved on the device where the issue occurred, but the OnTextCommitted event is being called twice on devices that were working normally.

The same Text parameter is being entered twice.

Hi There,

Did you also apply the other CL 43920988 mentioned in that post?

Are you also using bEnableNewKeyboard=true?

I’ll keep looking further to track down the issue.

Kind Regards

Keegan GIbson

Thank you for your reply.

I applied all the CLs you suggested,

but the OnTextCommitted event with the same parameters was called twice.

The bEnableNewKeyboard parameter is also set to True.

Hi there,

Just to confirm, are you only handling the on Enter commit method, and still getting double commits?

[Image Removed]

I didn’t quite get to checking this, with a debugger, on device today, but will be trying that on Monday (NZDT)

Regards,

Lance Chaney

Yes, that’s right. The same Text is called twice with the OnEnter type.

For exception handling, I checked only when the Text was the same as the parameter using GetText of UEditableTextBox within the OnTextCommitted event, and even though I initialized the Text of UEditableTextBox with FString() at the end of the event, it was not processed.

Hi there,

I’ve been debugging the double commit issue and have found the following. This appears to be intended behavior, since you are getting one commit from the Enter key event (Done on the virtual keyboard should be mapped to the Enter key event by the engine), and a second one from the virtual keyboard dismissal. If you dismiss the virtual keyboard without hitting done, you will see a single commit happening. You are getting two events here because you set the Virtual Keyboard Dismiss Action to Text Commit on Dismiss. In theory, you should actually be getting two commit events on your Samsung Galaxy S23+ as well. However, since you are not, there could still be an issue here. Can you try setting the Virtual Keyboard Dismiss Action to Text Change on Dismiss (the default) on your Samsung Galaxy S23+ and see if you are getting any commit events when you hit the done button?

If you are not, I think this warrants another bug report.

Regards,

Lance Chaney

Hello,

Changing the commit options for the editable text box did not resolve the issue, so I ended up backing out the code from the project. CL: 44285527 It seems that there is some kind of side effect in the task.

To clarify, do you mean that changing the editable text box’s `Virtual Keyboard Dismiss Action` to `Text Change on Dismiss` still results in a double commit, through the `On Enter` commit method, on Non-Samsung Galaxy S23+ devices, when pressing the `Done` button on the virtual keyboard? I have not been able to replicate this behavior on a fresh 5.5 source build with both CL 43920988 and 44285527 applied. I only get a second commit from the `On Cleared` commit method in this case, but not from `On Enter`. Would you be able to provide a minimal reproduction project? in case I am missing any other settings that might be important.

Regards,

Lance Chaney