HTML5 is Doing a Zoom when opening the virtual keyboard

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LuckieNoob


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: TestCompile_1 by LuckieNoob

Here is how it looks on andoid Android - Keyboard shows up focus stays in the edit - Album on Imgur 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: Iphone Edit Jumps to empty place - Album on Imgur 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 ?

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)

LuckieNoob | 2022-12-29 12:23