Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/components/trade/FundingExplainerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FC, useEffect, useRef } from "react";
import { createPortal } from "react-dom";
import gsap from "gsap";
import { usePrefersReducedMotion } from "@/hooks/usePrefersReducedMotion";
import { useLockBodyScroll } from "@/hooks/useLockBodyScroll";

interface FundingExplainerModalProps {
onClose: () => void;
Expand All @@ -13,6 +14,10 @@ export const FundingExplainerModal: FC<FundingExplainerModalProps> = ({ onClose
const overlayRef = useRef<HTMLDivElement>(null);
const modalRef = useRef<HTMLDivElement>(null);
const prefersReduced = usePrefersReducedMotion();
// #2286: this was the ONE modal of the five without a scroll lock, so the
// page scrolled behind it. The other four already call this hook; the
// divergence the issue describes is now down to this and the scrim.
useLockBodyScroll();

// Keep the onClose callback in a ref so the mount effect never re-runs on parent
// re-renders. The parent FundingRateCard runs a 1-second `setCountdown` setInterval,
Expand Down
2 changes: 1 addition & 1 deletion app/components/trade/SendPositionNftModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const SendPositionNftModal: FC<SendPositionNftModalProps> = ({
onClick={(e) => {
if (e.target === e.currentTarget && !loading) onCancel();
}}
className="fixed inset-0 z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-[2px] p-4"
className="fixed inset-0 z-[9999] flex items-center justify-center bg-black/80 p-4"
aria-modal="true"
role="dialog"
aria-label="Send Position NFT"
Expand Down
Loading