update viewer rect on fullscreen change event
This commit is contained in:
parent
9a6b79c41e
commit
242e0cdc19
1 changed files with 2 additions and 0 deletions
|
@ -98,8 +98,10 @@ export default function FileViewer(props: Props) {
|
||||||
if (inline) {
|
if (inline) {
|
||||||
handleResize();
|
handleResize();
|
||||||
window.addEventListener('resize', handleResize);
|
window.addEventListener('resize', handleResize);
|
||||||
|
window.addEventListener('fullscreenchange', handleResize);
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('resize', handleResize);
|
window.removeEventListener('resize', handleResize);
|
||||||
|
window.removeEventListener('fullscreenchange', handleResize);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, [setFileViewerRect, inline]);
|
}, [setFileViewerRect, inline]);
|
||||||
|
|
Loading…
Reference in a new issue