fix(core): center peek zoomIn animation not work in firefox (#8817)

This commit is contained in:
CatsJuice
2024-11-14 08:30:07 +00:00
parent 97d6f53932
commit 343152e162

View File

@@ -9,6 +9,7 @@ import {
useCallback,
useContext,
useEffect,
useLayoutEffect,
useRef,
useState,
} from 'react';
@@ -313,7 +314,7 @@ export const PeekViewModalContainer = forwardRef<
};
}, [onOpenChange]);
useEffect(() => {
useLayoutEffect(() => {
if (animation === 'zoom') {
open ? animateZoomIn() : animateZoomOut();
} else if (animation === 'fade') {