fix conflict with mobile preview pane

This commit is contained in:
Michael Shamoon
2022-02-16 12:00:19 -08:00
parent 06253ed8f2
commit 1941be8f53
2 changed files with 12 additions and 6 deletions

View File

@@ -75,8 +75,7 @@ export class DocumentDetailComponent implements OnInit, OnDestroy, DirtyComponen
@ViewChild('nav') nav: NgbNav
@ViewChild('pdfPreview') set pdfPreview(element) {
// this gets called when compontent added or removed from DOM
if (element && element.nativeElement.offsetParent !== null) { // its visible
if (element && element.nativeElement.offsetParent !== null && this.nav?.activeId == 4) { // its visible
setTimeout(()=> this.nav?.select(1));
}
}