Improve safari image scrolling performance (#12429)

* Don't set z-height on iOS

* More z-index cleanup
This commit is contained in:
Nicolas Mowen
2024-07-13 10:54:24 -06:00
committed by GitHub
parent 843d301950
commit a4eb435f1a
2 changed files with 29 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
import { cn } from "@/lib/utils";
import { LogSeverity } from "@/types/log";
import { ReactNode, useMemo, useRef } from "react";
import { isIOS } from "react-device-detect";
import { CSSTransition } from "react-transition-group";
type ChipProps = {
@@ -34,8 +35,9 @@ export default function Chip({
<div
ref={nodeRef}
className={cn(
"z-10 flex items-center rounded-2xl px-2 py-1.5",
"flex items-center rounded-2xl px-2 py-1.5",
className,
!isIOS && "z-10",
)}
onClick={onClick}
>