Closed plemens closed 4 days ago
I didn't expect the browsers to work so differently! I believe it's a timing issue. You can almost certainly work around this problem by opening the new instance of <ngx-extended-pdf-viewer>
with a short delay. Start with 1 second, but I suppose 100 milliseconds should be enough, or maybe even less.
Nonetheless, it's a bug, and I should at least try to solve it. Just be aware it might be difficult. I'm reluctant to promise a solution right now because I might not be able to deliver it.
Thanks for the quick reply. The following workaround solves the problem in the Safari browser.
HTML:
<ngx-extended-pdf-viewer *ngIf="showPdfViewer" ....
TS:
ngOnInit() {
setTimeout(() => {
this.showPdfViewer = true;
}, 250);
}
It was a lot of work - but finally, I've managed to puzzle it out. Version 20.5.0 fixes the problem.
Thank You :-)
Safari BUG: If you click back and forth between different PDFs in Safari, an error message appears and the document is not displayed.
You can also easily reproduce the error on the PDF Showcase page. https://pdfviewer.net/extended-pdf-viewer/book-mode Simply open the console log output and switch back and forth between the documents in DEMOS and manual. The following error message then appears in the console log.