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)}
|
onMouseEnter={() => setGridBtnActive(true)}
|
||||||
onMouseLeave={() => setGridBtnActive(false)}
|
onMouseLeave={() => setGridBtnActive(false)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const root = document.querySelector(".dicom-viewer-root") as HTMLElement;
|
const root = appRootRef.current;
|
||||||
if (!root) return;
|
if (!root) return;
|
||||||
if (document.fullscreenElement === root) {
|
if (document.fullscreenElement === root) {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen();
|
||||||
|
|||||||
Reference in New Issue
Block a user