mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 09:06:23 +01:00
Attempt to fix menu sometimes not closeable on Mobile Safari
This commit is contained in:
parent
393a473649
commit
59cf6b2a58
1 changed files with 8 additions and 1 deletions
|
@ -339,6 +339,7 @@ function Status({
|
|||
}
|
||||
};
|
||||
|
||||
const menuInstanceRef = useRef();
|
||||
const StatusMenuItems = (
|
||||
<>
|
||||
{!isSizeLarge && (
|
||||
|
@ -559,22 +560,28 @@ function Status({
|
|||
{size !== 'l' &&
|
||||
(url ? (
|
||||
<Menu
|
||||
instanceRef={menuInstanceRef}
|
||||
portal={{
|
||||
target:
|
||||
document.querySelector('.status-deck') || document.body,
|
||||
}}
|
||||
containerProps={{
|
||||
onClick: () => {
|
||||
menuInstanceRef.current?.closeMenu?.();
|
||||
},
|
||||
}}
|
||||
align="end"
|
||||
offsetY={4}
|
||||
overflow="auto"
|
||||
viewScroll="close"
|
||||
boundingBoxPadding="8 8 8 8"
|
||||
unmountOnClose
|
||||
menuButton={
|
||||
<Link
|
||||
to={instance ? `/${instance}/s/${id}` : `/s/${id}`}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
console.log('click', e);
|
||||
}}
|
||||
class="time"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue