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)
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.
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.
detect changes on the textbox with runservice heartbeat instead of using propertychangedsignal
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!
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
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.