+2 votes


I have an application that uses a Textedit as an input. It is compiled as HTML 5

I use :

func _on_EditAnswer_focus_entered():

to open the Virtual Keyboard. Everything works as usual on Android and Desktop but on IOS, the text edit jumps out oft the edit and zooms in. This makes the app unusable.

I have a version of the application here: https://luckienoob.itch.io/testcompile-1

Here is how it looks on andoid https://imgur.com/a/C9KeRQJ the keyboard opens up and the focus stays in the edit. Now the user can type in things and everything works as it should

This happens on Iphone: https://imgur.com/a/PiujyME The Textedit loses the focus and jumps to a black place. Also the app zooms in. So overall it is not usable from here. There is no way to reset the focus and enter the edit again.

When this Zooming thing happens, the text that is typed on the keyboard actually gets in the edit although it looks like the courser is in the black. But the zoom makes it impossible to see the edit anymore.

How can I get rid of this Zoom that only appears on IOS ?

in Engine by (14 points)

I couldn't solve it but here is an okayish workaround:

func _on_EditAnswer_focus_entered():
    var agent = JavaScript.eval("navigator.userAgent" ,true)
    if("iPhone" in agent): 
        $EditAnswer.text = JavaScript.eval("prompt('%s', '%s');" % ["Please enter Answer:", $EditAnswer.text], true)


Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.