TextBoxes typing problem

I found a workaround of keyboard crash on Android. I made some debounce for changing event.
It’s looks like it:

local debounce = false

textbox.Changed:Connect(function(a)
   if a == "Text" then
     if not debounce then
       debounce = true
       textbox.Text = textbox.Text
       task.wait()
       debounce = false
     end
   end
end)

But now auto-correct is unstable and overall it’s not an ideal solution for this. But I’m sure that this is due to the event cycle, which calls itself due to text changes. (This happens naturally when using auto-correction)

1 Like

Can confirm this is still happening. Honestly I might just make my own custom keyboard when I detect users are on mobile

2 Likes

Still happens. Please fix this as my game heavily relies on textbox input.

1 Like

Still Happening! Its been a while we are all complaining about it! Please do something!

1 Like

It happens to me as well, in only some specific games. (Sorry for the bump)

Hi all! I’m trying to reproduce this issue but having a difficult time. Is it literally just typing in a TextBox and using auto correct on mobile where this issue is triggered?

If someone could share a place file that reproduces the issue that would be very handy. Thank you!

I was able to reproduce this problem on Android using the Roact framework, in which I create a input field and process the state when editing text. With a 25-35% chance, when using auto-correct, the text can be reset to its previous state, although if you look at the state update code, this should not happen.

I also reproduced this behavior on the Roblox menu located in CoreGui, This way you can make sure that the problem is not in my code.

Repro place.
Typing Bug Test.rbxl (123.7 KB)

Video.

I can’t say exactly what exactly is the reason for this behavior, but I can assume that Android and iOS use their own system input fields (API controls), and because of this there is conflicting behavior with the Roblox input field, we can say that there are 2 different field objects that interact between itself, and perhaps the .Changed event causes a false positive. I can’t be precise because I don’t know how it works in the Roblox engine.

1 Like

Followup on this, found a decent workaround

  1. detect changes on the textbox with runservice heartbeat instead of using propertychangedsignal

  2. on each heartbeat step, if the textbox text is the same as the potential edited text, skip it. Otherwise edit the textbox text to the new values

That should do it and I tested it on several devices with several different parameters (only numbers and char limits) and it doesnt make the textbox go crazy anymore.

You can also obviously optimize it so you only run the heartbeat step if the UI is visible, etc. This should suffice until roblox fixes the getpropertychangedsignal stuff

Thanks @pozzzy333 and @Zenith322 for providing this additional info. We have been unable to reproduce so far but are still investigating the issue. Hopefully we can provide updates soon regarding a fix. Thanks!

Is there any update on this being fixed yet?

Hello, i think this bug affect some types of devices because my new Samsung phone is more stable on this.
Here’s my impacted device:
Redmi Note 8T
MIUI Global 12.5.6 Stable

1 Like

Based on some observations, I can assume that the bug with duplicated characters on mobile devices occurs during a short lag or low FPS.

1 Like

Hi folks, thank you all for your patience.

We currently have a fix in progress that should solve many of the issues related to setting the Text of a TextBox within its change signal / within react state. We will be continuing to monitor and follow up on any issues that are still present after the fix rolls out.

2 Likes

Hi folks, thank you for your patience. We’ve rolled out a fix for this. Please feel free to follow up if you’re still seeing issues.

1 Like