Screen not resizing properly after rotating when editbox is focused

This is for version 2.4.11

Did anyone experience this when using edit box?

On ios Safari and chrome:
If I click on the edit box, then the keyboard will show, then I rotate my phone, then the game does resize, keyboard still there but it doesn’t scroll the input to the middle.

the inputbox is at the center of the screen as expected which is good

On chrome on android:
If I click on the edit box, then the keyboard will show, then I rotate my phone, then the game does not resize and maintain in the portrait mode in the landscape screen and vise versa, and the keyboard is hidden, and stuck at the screen until I rotate back with the keyboard remained hidden

the inputbox is at the top instead of center of the screen (I managed to fix with changing top to center block:“center” in scrollIntoView function in WebEditBoxImpl in the engine)

Also do you mind to tell me where can I find the code that tell the editbox that the screen is resizing the engine, incase you couldn’t fix in time, as I’m needing to fix this urgently

Thanks

I managed to fix it by commenting out the cc.view.resizeWithBrowserSize(false); in _showDomOnMobile function in WebEditBoxImpl in the engine, and also blur the editbox when receiving any resize callback in the game.

Also I noticed that the auto fullscreen will be set back to to enabled after blurring the edit box even though I have set my game not to auto update do check on that.

Thanks

1 Like