TextBox isn't working on Mobile

I know that on mobile, you can use TextButton.MouseButton1Up to make buttons work. My problem is that I cannot get TextBox to work on Mobile. I tried turning on Selectable and I cannot find any sources on how to fix this problem.

3 Likes

Wasn’t able to replicate this issue myself?

1 Like

If you can actually show the error or even give us a better explanaition of the error? This would be very helpful.

1 Like

There isn’t an error. It just doesn’t show the keyboard or anything. Me and my brother tested this on both of our devices, and none of ours let us type.

1 Like

Try changing it to MouseButton1Down. I’m pretty sure I’ve only ever used MouseButton1Up when I’m releasing my mouse.

I know how to fix the TextButton problem with mobile already. I’m just not sure about the TextBox.

1 Like

Can you send the code please? It’ll help a lot.

It’s not the code. A TextBox is a GUI object which allows you to type within its boundaries if you click on it. When I try to type on it on mobile, nothing happens. The keyboard doesn’t show up. Everything works perfectly fine on Computer.

2 Likes

Ok so the fix to this is using :CaptureFocus() with .MouseButton1Click event and make sure it is active

1 Like

Has a bug report been filed for this?

1 Like

see my reply, just use mousebutton1click event with capturefocus

.Activated is only for GuiButtons.

That’s such a hacky workaround. Prevents the user from selecting/highlighting text, unless you go the even more hacky way round of seeing if TouchEnabled is set and only using it in that circumstance…

Well, its a temporary fix if waiting for a bug fix🤷‍♂️

Hence my question was is if a bug report had been filed, which I still don’t know the answer to :confused:

1 Like

Since this is the top result on google for “TextBox not working on mobile”, I will just comment that I’ve found that in my project, the issue turned out to be that Active was set to False, whereas it must be set to True to function on mobile.

19 Likes

Yeah that was literally the problem, took me forever, thanks a lot! :star_struck:

1 Like

Solved my problem only a bit of time later