4

I've got a web site "application" which is not an app, but an actual web page you'd use through Chrome or some other browser. In iOS invoking the keyboard (via an input element for example) doesn't change the viewport ratio or resize anything, but on Android it does. This is causing insane layout problems for my app "page", as we have to distinguish between portrait and landscape view orientations.

I found many answers about android:windowSoftInputMode activity configs w/rt keyboard display and interaction with media queries, and how to specify your desired value (in my case, "adjustNothing"), but I haven't found anything on how to invoke this configuration when you're looking at a web page via chrome or any other browser.

So does anyone know of a way to do this via JavaScript or some other in-page code? Thanks.

the_dude_abides
  • 563
  • 4
  • 10

1 Answers1

0

That was fixed in Chrome 108 https://developer.chrome.com/blog/viewport-resize-behavior/#changing-the-default-behavior-in-chrome-108

Regarding the behaviour of viewport with keyboard:

Now we have new meta tag value called interactive-widget

<meta name="interactive-widget" content="overlays-content">

Links

https://developer.chrome.com/blog/viewport-resize-behavior/

https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag#the_effect_of_interactive_ui_widgets

https://github.com/bramus/viewport-resize-behavior/blob/main/explainer.md

Info thanks to morrison-chang comment from 2016

fearis
  • 424
  • 3
  • 15