diff --git a/dicom-viewer/src/App.tsx b/dicom-viewer/src/App.tsx index 449fac7..cf00507 100644 --- a/dicom-viewer/src/App.tsx +++ b/dicom-viewer/src/App.tsx @@ -4232,7 +4232,7 @@ function App({ container_id, imageStacks, autoCacheStack, annotationJson, viewer onMouseEnter={() => setGridBtnActive(true)} onMouseLeave={() => setGridBtnActive(false)} onClick={() => { - const root = document.querySelector(".dicom-viewer-root") as HTMLElement; + const root = appRootRef.current; if (!root) return; if (document.fullscreenElement === root) { document.exitFullscreen();