From 7d5b8084908f68a402da6d5f40d20d31c14f31d0 Mon Sep 17 00:00:00 2001 From: Igor Octaviano Date: Wed, 18 Oct 2023 09:15:34 -0300 Subject: [PATCH] Rollback populate viewports call to did mount --- src/components/SlideViewer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/SlideViewer.tsx b/src/components/SlideViewer.tsx index 4936b97e..c5939f65 100644 --- a/src/components/SlideViewer.tsx +++ b/src/components/SlideViewer.tsx @@ -1704,12 +1704,13 @@ class SlideViewer extends React.Component { 'keyup', this.onKeyUp ) + window.addEventListener('beforeunload', this.componentCleanup) window.addEventListener('resize', this.onWindowResize) } componentDidMount (): void { - window.addEventListener('beforeunload', this.componentCleanup) this.componentSetup() + this.populateViewports() if (!this.props.slide.areVolumeImagesMonochrome) { let hasICCProfile = false