chore: bump version to 0.9.97
fix: skip visualViewport height in iframe to prevent mobile layout collapse
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vocechat-web",
|
"name": "vocechat-web",
|
||||||
"version": "0.9.96",
|
"version": "0.9.97",
|
||||||
"homepage": "https://voce.chat",
|
"homepage": "https://voce.chat",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@metamask/onboarding": "^1.0.1",
|
"@metamask/onboarding": "^1.0.1",
|
||||||
|
|||||||
@@ -17,9 +17,14 @@ const isIOS = () =>
|
|||||||
* `-webkit-fill-available`, so we skip it there to avoid the container
|
* `-webkit-fill-available`, so we skip it there to avoid the container
|
||||||
* being over-shrunk when the keyboard opens.
|
* being over-shrunk when the keyboard opens.
|
||||||
*/
|
*/
|
||||||
|
const isInIframe = () => window.location !== window.parent.location;
|
||||||
|
|
||||||
export default function useVirtualKeyboard() {
|
export default function useVirtualKeyboard() {
|
||||||
useEffect(() => {
|
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;
|
const vv = window.visualViewport;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user