mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Avoid creating a PDFFindBar
instance, in the Firefox built-in viewer, when not actually necessary
This is similar to how `PDFPresentationMode` isn't used when the Fullscreen API isn't supported.
This commit is contained in:
parent
1f287ec486
commit
46b61ff12e
1 changed files with 6 additions and 2 deletions
|
@ -352,7 +352,9 @@ let PDFViewerApplication = {
|
|||
});
|
||||
pdfLinkService.setHistory(this.pdfHistory);
|
||||
|
||||
this.findBar = new PDFFindBar(appConfig.findBar, eventBus, this.l10n);
|
||||
if (!this.supportsIntegratedFind) {
|
||||
this.findBar = new PDFFindBar(appConfig.findBar, eventBus, this.l10n);
|
||||
}
|
||||
|
||||
this.pdfDocumentProperties =
|
||||
new PDFDocumentProperties(appConfig.documentProperties,
|
||||
|
@ -598,7 +600,9 @@ let PDFViewerApplication = {
|
|||
this.pdfOutlineViewer.reset();
|
||||
this.pdfAttachmentViewer.reset();
|
||||
|
||||
this.findBar.reset();
|
||||
if (this.findBar) {
|
||||
this.findBar.reset();
|
||||
}
|
||||
this.toolbar.reset();
|
||||
this.secondaryToolbar.reset();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue