Refactor fullscreen exit logic to use appRootRef for improved reliability

This commit is contained in:
Ross
2026-04-27 09:43:41 +01:00
parent add45567d8
commit d34772a3fa
+1 -1
View File
@@ -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();