From 708581ea38db2a86197a28253f0bfbdf1443413a Mon Sep 17 00:00:00 2001 From: Timo K Date: Fri, 8 Aug 2025 15:37:55 +0200 Subject: [PATCH] use body instead of root node Signed-off-by: Timo K --- src/tile/SpotlightTile.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tile/SpotlightTile.tsx b/src/tile/SpotlightTile.tsx index eaef98f1..8bc45a81 100644 --- a/src/tile/SpotlightTile.tsx +++ b/src/tile/SpotlightTile.tsx @@ -213,7 +213,7 @@ export const SpotlightTile: FC = ({ const canGoToNext = visibleIndex !== -1 && visibleIndex < media.length - 1; const isFullscreen = useCallback((): boolean => { - const rootElement = document.getElementById("root"); + const rootElement = document.body; if (rootElement && document.fullscreenElement) return true; return false; }, []); @@ -223,7 +223,7 @@ export const SpotlightTile: FC = ({ : FullScreenMaximiseIcon; const onToggleFullscreen = useCallback(() => { - const rootElement = document.getElementById("root"); + const rootElement = document.body; if (!rootElement) return; if (isFullscreen()) { void document?.exitFullscreen();