From 1e4fccb826e1279f70f90c6e8ac55866655cb3dc Mon Sep 17 00:00:00 2001 From: Gigiaj Date: Wed, 18 Jun 2025 19:57:05 -0500 Subject: [PATCH] Fixes the drag jitter on Android and only the grabber working after the virtual keyboard appears once --- .../mobile-context-menu/MobileContextMenu.jsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/molecules/mobile-context-menu/MobileContextMenu.jsx b/src/app/molecules/mobile-context-menu/MobileContextMenu.jsx index e2915e7c..41ef7a3c 100644 --- a/src/app/molecules/mobile-context-menu/MobileContextMenu.jsx +++ b/src/app/molecules/mobile-context-menu/MobileContextMenu.jsx @@ -5,6 +5,14 @@ import './MobileContextMenu.scss'; export function MobileContextMenu({ isOpen, onClose, children }) { const { innerHeight } = window; + useEffect(() => { + if (isOpen) { + document.body.style.overscrollBehavior = 'contain'; + } + return () => { + document.body.style.overscrollBehavior = 'auto'; + }; + }, [isOpen]); const [{ y }, api] = useSpring(() => ({ y: innerHeight, @@ -49,11 +57,13 @@ export function MobileContextMenu({ isOpen, onClose, children }) { {...bind()} style={{ y, - touchAction: 'pan-y', + touchAction: 'none', }} >
-
{children}
+
+ {children} +
);