This commit is contained in:
2025-11-07 22:26:27 +01:00
parent 0bd54ef941
commit 08cf8bd50f
@@ -99,6 +99,7 @@ const PreviewZoomOverlay = ({
}
}, [open]);
useEffect(() => {
if (!open || !isNativeScale) {
return;
@@ -148,6 +149,19 @@ const PreviewZoomOverlay = ({
const activeDisplay = open && display?.url ? display : displaySnapshot;
useEffect(() => {
if (!activeDisplay?.url) {
return;
}
const scrollEl = scrollRef.current;
if (scrollEl) {
scrollEl.scrollLeft = 0;
scrollEl.scrollTop = 0;
}
focusRef.current = null;
}, [activeDisplay?.url]);
useEffect(() => {
if (!renderBackdrop || !activeDisplay?.url) {
return undefined;