From 242e0cdc19e2f8bb445f6a3b0157b6d6a8366c45 Mon Sep 17 00:00:00 2001 From: Baltazar Gomez Date: Sun, 13 Oct 2019 15:42:48 -0600 Subject: [PATCH] update viewer rect on fullscreen change event --- src/ui/component/fileViewer/view.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/component/fileViewer/view.jsx b/src/ui/component/fileViewer/view.jsx index a8235c88b..d980d7ce2 100644 --- a/src/ui/component/fileViewer/view.jsx +++ b/src/ui/component/fileViewer/view.jsx @@ -98,8 +98,10 @@ export default function FileViewer(props: Props) { if (inline) { handleResize(); window.addEventListener('resize', handleResize); + window.addEventListener('fullscreenchange', handleResize); return () => { window.removeEventListener('resize', handleResize); + window.removeEventListener('fullscreenchange', handleResize); }; } }, [setFileViewerRect, inline]);