Skip to content
Snippets Groups Projects
Verified Commit f798ba91 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: safari issue with fullscreen

parent 96ced666
No related branches found
No related tags found
No related merge requests found
Pipeline #1521 passed
......@@ -98,7 +98,8 @@ export const Display: FC<DisplayProps> = ({
// requests the browser to go fullscreen using the
// body of the document as the entry HTML element
nativeFullscreen &&
document.body?.requestFullscreen().catch(() => {});
document.body.requestFullscreen &&
document.body.requestFullscreen().catch(() => {});
} else {
setWidth(undefined);
setHeight(undefined);
......@@ -109,7 +110,9 @@ export const Display: FC<DisplayProps> = ({
// restores the window mode, returning from the
// fullscreen browser
nativeFullscreen && document?.exitFullscreen().catch(() => {});
nativeFullscreen &&
document.exitFullscreen &&
document.exitFullscreen().catch(() => {});
}
return () => {
window.removeEventListener("resize", resizeRef.current);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment