From 59cf6b2a5870bb6bf85070f797e92ec043ad920a Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 28 Feb 2023 15:45:38 +0800 Subject: [PATCH] Attempt to fix menu sometimes not closeable on Mobile Safari --- src/components/status.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 9a61b19d..b8f583d5 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -339,6 +339,7 @@ function Status({ } }; + const menuInstanceRef = useRef(); const StatusMenuItems = ( <> {!isSizeLarge && ( @@ -559,22 +560,28 @@ function Status({ {size !== 'l' && (url ? ( { + menuInstanceRef.current?.closeMenu?.(); + }, + }} align="end" offsetY={4} overflow="auto" viewScroll="close" boundingBoxPadding="8 8 8 8" + unmountOnClose menuButton={ { e.preventDefault(); e.stopPropagation(); - console.log('click', e); }} class="time" >