Prerequisites
Ionic Framework Version
Current Behavior
In Chrome 108 and later, when the on-screen keyboard is open (e.g., an input is focused), the Visual Viewport is smaller than the Layout Viewport, causing the entire app to be scrollable (including headers, footers, etc.).
This behavior is also present in Safari, as it uses the same layout/visual viewport behavior.
Expected Behavior
The body element should be resized to the height of the Visual Viewport so that the app is not made scrollable.
Steps to Reproduce
- View an app that has input, using Chrome 108 or later.
- Focus the input, causing the OSK to open.
- The entire app becomes scrollable.
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.16.3 (C:\Users\Darryl\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/vue 6.5.0
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v18.4.0 (C:\Program Files\nodejs\node.exe)
npm : 8.19.2
OS : Windows 10
Additional Information
This can probably be fixed by using CSS dynamic viewport units to set the body element to the dynamic viewport size.
Chrome 108 also includes support for these, so this change should be fully compatible.
However, I am not sure if these units account for the OSK.
Prerequisites
Ionic Framework Version
Current Behavior
In Chrome 108 and later, when the on-screen keyboard is open (e.g., an input is focused), the Visual Viewport is smaller than the Layout Viewport, causing the entire app to be scrollable (including headers, footers, etc.).
This behavior is also present in Safari, as it uses the same layout/visual viewport behavior.
Expected Behavior
The body element should be resized to the height of the Visual Viewport so that the app is not made scrollable.
Steps to Reproduce
Code Reproduction URL
No response
Ionic Info
Additional Information
This can probably be fixed by using CSS dynamic viewport units to set the body element to the dynamic viewport size.
Chrome 108 also includes support for these, so this change should be fully compatible.
However, I am not sure if these units account for the OSK.