diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts index 22853dd02..2b1cf7aac 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts @@ -556,12 +556,15 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { viewerReady($event: WebViewerInstance) { this._instance = $event; - this.viewReady = true; this._cleanupAndRedrawManualAnnotations(); + this.viewReady = true; // Go to initial page from query params const pageNumber = this._activatedRoute.snapshot.queryParams.page; if (pageNumber) { - this.selectPage(parseInt(pageNumber, 10)); + setTimeout(() => { + this.selectPage(parseInt(pageNumber, 10)); + this._scrollViews(); + }, 500); } } @@ -718,6 +721,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { switchView($event: MatButtonToggleChange) { this.viewMode = $event.value; this.updateViewMode(); + this._scrollViews(); } downloadOriginalFile() {