diff --git a/components/album/progressive-image.tsx b/components/album/progressive-image.tsx index a2e08327..1ea6ec73 100644 --- a/components/album/progressive-image.tsx +++ b/components/album/progressive-image.tsx @@ -191,8 +191,17 @@ export default function ProgressiveImage( }} /> - - {webGLAvailable ?
hidden/visible. preserves the DOM and + component state but runs the child's effect cleanup on hide — which + fires the WebGL engine's destroy()/loseContext(). Because the same + canvas is reused and `isInitialized` state is preserved, re-opening + never rebuilds the engine and lands on a permanently-lost context → + blank image + crash on the 2nd open. Mount/unmount gives every open a + fresh canvas + context (and destroy() on a discarded canvas stays + correct), fixing the crash while keeping the FU-13 leak fix intact. */} + {showFullScreenViewer && ( + webGLAvailable ?
{ // 点击背景关闭 @@ -283,8 +292,8 @@ export default function ProgressiveImage( src={highResImageUrl} alt={props.alt || 'image'} /> -
} -
+
+ )} ) : null}