Refactor fullscreen exit logic to use appRootRef for improved reliability
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user