fix(ios): mobile modal occlusion issues (#11427)

Close [BS-2925](https://linear.app/affine-design/issue/BS-2925/移动端-dialog-遮挡相关)
This commit is contained in:
L-Sun
2025-04-03 01:51:57 +00:00
parent 80a663efe7
commit b53b2acfe3
7 changed files with 49 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ import type {
DropdownMenuSubContentProps,
DropdownMenuSubProps,
} from '@radix-ui/react-dropdown-menu';
import type { ReactNode } from 'react';
import type { CSSProperties, ReactNode } from 'react';
export interface MenuProps {
children: ReactNode;
@@ -15,6 +15,7 @@ export interface MenuProps {
portalOptions?: Omit<DropdownMenuPortalProps, 'children'>;
rootOptions?: Omit<DropdownMenuProps, 'children'>;
contentOptions?: Omit<DropdownMenuContentProps, 'children'>;
contentWrapperStyle?: CSSProperties;
noPortal?: boolean;
}

View File

@@ -32,6 +32,7 @@ export const MobileMenu = ({
...otherContentOptions
} = {},
contentWrapperStyle,
rootOptions,
}: MenuProps) => {
const [subMenus, setSubMenus] = useState<SubMenuContent[]>([]);
@@ -131,6 +132,7 @@ export const MobileMenu = ({
className: clsx(className, styles.mobileMenuModal),
...otherContentOptions,
}}
contentWrapperStyle={contentWrapperStyle}
disableAutoFocus={true}
>
<div