chore: bump version to 0.9.97

fix: skip visualViewport height in iframe to prevent mobile layout collapse
This commit is contained in:
haorwen
2026-06-28 07:58:14 +08:00
parent e188afe380
commit c397e28a5f
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "vocechat-web",
"version": "0.9.96",
"version": "0.9.97",
"homepage": "https://voce.chat",
"dependencies": {
"@metamask/onboarding": "^1.0.1",
+6 -1
View File
@@ -17,9 +17,14 @@ const isIOS = () =>
* `-webkit-fill-available`, so we skip it there to avoid the container
* being over-shrunk when the keyboard opens.
*/
const isInIframe = () => window.location !== window.parent.location;
export default function useVirtualKeyboard() {
useEffect(() => {
if (isIOS()) return;
// In an iframe, visualViewport.height reflects the intersection of the
// iframe with the parent's viewport, not the iframe's own height.
// 100vh already equals the iframe's own height, so skip setting --vh-visible.
if (isIOS() || isInIframe()) return;
const vv = window.visualViewport;