From 1eaeb42749c0fe7c6f1fe1744f6b7d5177eb861f Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:30:48 -0600 Subject: [PATCH] detail stream scrolling fixes for HA/iOS --- web/src/components/timeline/DetailStream.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src/components/timeline/DetailStream.tsx b/web/src/components/timeline/DetailStream.tsx index f96a18456..2444aa92e 100644 --- a/web/src/components/timeline/DetailStream.tsx +++ b/web/src/components/timeline/DetailStream.tsx @@ -25,10 +25,12 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip"; import { Link } from "react-router-dom"; import { Switch } from "@/components/ui/switch"; import { useUserPersistence } from "@/hooks/use-user-persistence"; -import { isDesktop } from "react-device-detect"; +import { isDesktop, isIOS, isMobile } from "react-device-detect"; import { resolveZoneName } from "@/hooks/use-zone-friendly-name"; import { PiSlidersHorizontalBold } from "react-icons/pi"; import { MdAutoAwesome } from "react-icons/md"; +import { isPWA } from "@/utils/isPWA"; +import { isInIframe } from "@/utils/isIFrame"; type DetailStreamProps = { reviewItems?: ReviewSegment[]; @@ -113,7 +115,7 @@ export default function DetailStream({ setProgrammaticScroll(); scrollIntoView(element, { scrollMode: "if-needed", - behavior: "smooth", + behavior: isMobile && isIOS && !isPWA && isInIframe ? "auto" : "smooth", }); } }, [activeReviewId, setProgrammaticScroll, userInteracting, isPlaying]); @@ -163,7 +165,8 @@ export default function DetailStream({ setProgrammaticScroll(); scrollIntoView(element, { scrollMode: "if-needed", - behavior: "smooth", + behavior: + isMobile && isIOS && !isPWA && isInIframe ? "auto" : "smooth", }); } }