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) {
|
||||
handleResize();
|
||||
window.addEventListener('resize', handleResize);
|
||||
window.addEventListener('fullscreenchange', handleResize);
|
||||
return () => {
|
||||
window.removeEventListener('resize', handleResize);
|
||||
window.removeEventListener('fullscreenchange', handleResize);
|
||||
};
|
||||
}
|
||||
}, [setFileViewerRect, inline]);
|
||||
|
|
Loading…
Add table
Reference in a new issue