Seeing spinner/loading icon until cursor is moved and then PDF displays
See original GitHub issueHi
I am seeing the spinner/loading icon forever and pdf is not loading in the viewer until i move my mouse or open inspect element in chrome.
Problem statement: I see spinner forever and PDF is not displayed if i do not move my mouse.
Screen shot:
I managed to find the error in console:
The problem is if it happens every time, i will undestand that some thing is wrong with the classes. But it happens twice in every 5 time i open the modal.
Please help me to resolve this. Will you be able to set the default offsetparent so that it will never break ? Or else how do i handle the offsetParent ? because it works sometimes and not in sometimes? Is there a way to set the offset parent ? Please see if you can add the minimum offsetParent so that there wont be a spinner ?
Using the below code:
<div bsModal #pdfModal="bs-modal" class="modal" tabindex="-1" [config]="{ignoreBackdropClick: true, backdrop: 'static', keyboard: false}"
role="dialog">
<div class="modal-dialog modal-large">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title">View PDF in modal: src {{selectedSource}} <br>
{{stringSource}}</div>
</div>
<div class="modal-body" *ngIf="!selectedSource && stringSource">
<ngx-extended-pdf-viewer [src]="stringSource" height="100vh" zoom="115%" [useBrowserLocale]="true"
[showBorders]="false" backgroundColor="white" [showSidebarButton]="false" [showFindButton]="false"
[showPagingButtons]="false" [showZoomButtons]="true" [showPresentationModeButton]="false"
[showOpenFileButton]="false" [showPrintButton]="true" [showDownloadButton]="true"
[filenameForDownload]="false" [showBookmarkButton]="false" [showSecondaryToolbarButton]="true"
[showRotateButton]="true" [showHandToolButton]="false" [showScrollingButton]="false" [showSpreadButton]="false"
[showPropertiesButton]="false">
</ngx-extended-pdf-viewer>
</div>
<div class="modal-footer">
<button class="btn btn-primary" (click)="pdfModal.hide()">Close</button>
<button class="btn btn-primary" (click)="onPrint()">Print</button>
</div>
</div>
</div>
</div>
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
@dheerajm91 We seem to live in different time zones. I’l try your reproducer this evening, but first I have to go to work. 😃
You’re right, the modal window sounds like a hot trace. The original PDF viewer has only written to be used as the PDF viewer of Firefox. Making it work in an application wasn’t easy, and making it work in a modal window seems to be even more challenging.
That’s a good idea! I’ll add it to the documentation.