fix(core): center peek zoomIn animation not work in firefox (#8817)
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
useCallback,
|
useCallback,
|
||||||
useContext,
|
useContext,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
useLayoutEffect,
|
||||||
useRef,
|
useRef,
|
||||||
useState,
|
useState,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
@@ -313,7 +314,7 @@ export const PeekViewModalContainer = forwardRef<
|
|||||||
};
|
};
|
||||||
}, [onOpenChange]);
|
}, [onOpenChange]);
|
||||||
|
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (animation === 'zoom') {
|
if (animation === 'zoom') {
|
||||||
open ? animateZoomIn() : animateZoomOut();
|
open ? animateZoomIn() : animateZoomOut();
|
||||||
} else if (animation === 'fade') {
|
} else if (animation === 'fade') {
|
||||||
|
|||||||
Reference in New Issue
Block a user