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]);