TextBoxes typing problem

This issue still exists. It is severely hampering users in Lua Learning on iOS mobile devices.

3 Likes

Still exists in Jan 2023
iPhone 11, iOs 16.3

4 Likes

I found one thing that can cause this bug to occur. I tested many different properties of the textbox, and the only thing that I found so far that causes this bug to occur is slightly altering the text inside of the textbox while the player is typing.
This is the code I used to test:

local textBox = script.Parent.TextBox

textBox:GetPropertyChangedSignal("Text"):Connect(function()
	textBox.Text = textBox.Text:upper() -- just slightly altering the text by making it all uppercase
end)

I also tested a max-characters system, but I found that that didn’t cause this bug to happen.

4 Likes

for me, this max characters script breaks the textbox for mobile

TextBox:GetPropertyChangedSignal('Text'):Connect(function()
	TextBox.Text = string.sub(TextBox.Text, 1, MaxCharacters)
end)
3 Likes

I think that anytime you set the Text property of a TextBox to something (even the same text), it breaks the TextBox for mobile. You could try only setting the text if the max character limit is reached (I don’t know for sure if this will work, but I think it should).

3 Likes

nah i just made it so if the players tries to save something over the character limit, a message pops up saying what the character limit is and telling them it won’t save

2 Likes

Pretty sure this is still an issue? Had lots of complaints over the years from our player base. Exact same scenario as comments on this post. PC works completely fine.

3 Likes

Bump. Players are still experiencing this issue on mobile.

EnterUI.TextBox:GetPropertyChangedSignal("Text"):Connect(function()
	EnterUI.TextBox.Text = EnterUI.TextBox.Text:sub(1,240)
end)
4 Likes

Solution, check the length of the string before cutting it.
string.len

1 Like

Still happends with my players. I’m sure this happens if your code is

textbox.Changed:Connect(function(a)
   if a == "Text" then
     textbox.Text = textbox.Text
   end
end)

Although I’m not exactly sure why this happens. But this happens on certain types of devices. My Android phone does not have this problem. Many players of my games complain about this problem, but due to its nature, I cannot solve it. I work with text fields very closely so this is necessary for me. I know about workarounds, but I don’t think it’s very nice.

3 Likes

Can confirm this also happens in all my games where the textbox’s text is overwritten as the player is typing (on mobile). This impacts the user experience tremendously as some of the games I work on rely on user input!

1 Like

I can confirm this still happens (I have no screenshot however)
On device iPad (10th generation) running iPadOS 17.3 (this isn’t a public beta)
Just typing your name in The Presentation Experience when you join is extremely buggy. I wasted Robux on Write the next subject because my subject didn’t type properly

1 Like

I have a game in which this bug is very clearly visible. Also, on the Android system, when using auto-correction, the on-screen keyboard crashes and can no longer be used. You have to restart Roblox or even your phone.

The Game

Keyboard crash video on Android:


For some reason it only works in this game. It uses Roact library to display the GUI, but I don’t know how that might relate to what’s going on.

If Roblox staff has problems with how to reproduce this bug, they can try playing this game.

3 Likes

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.