diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx index b16dfe3153c..eed40a6185c 100644 --- a/app/components/sidebar.tsx +++ b/app/components/sidebar.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useCallback } from "react"; +import { useEffect, useRef, useCallback, useMemo } from "react"; import styles from "./home.module.scss"; @@ -28,7 +28,7 @@ import { } from "../constant"; import { Link, useNavigate } from "react-router-dom"; -import { useMobileScreen } from "../utils"; +import { isIOS, useMobileScreen } from "../utils"; import dynamic from "next/dynamic"; import { showConfirm, showToast } from "./ui-lib"; @@ -136,6 +136,11 @@ export function SideBar(props: { className?: string }) { const { onDragStart, shouldNarrow } = useDragSideBar(); const navigate = useNavigate(); const config = useAppConfig(); + const isMobileScreen = useMobileScreen(); + const isIOSMobile = useMemo( + () => isIOS() && isMobileScreen, + [isMobileScreen], + ); useHotKey(); @@ -144,6 +149,10 @@ export function SideBar(props: { className?: string }) { className={`${styles.sidebar} ${props.className} ${ shouldNarrow && styles["narrow-sidebar"] }`} + style={{ + // #3016 disable transition on ios mobile screen + transition: isMobileScreen && isIOSMobile ? "none" : undefined, + }} >