mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Ensure that PDFFindController_reset
actually resets *all* state (issue 7034)
To reduce code duplication, the initialization code now uses the `reset` method. Also, this patch moves `charactersToNormalize` out of `PDFFindController`, since it seemed better suited to be a "constant".
This commit is contained in:
parent
2b813c0ca4
commit
e7d039dbce
2 changed files with 43 additions and 44 deletions
|
@ -526,6 +526,8 @@ var PDFViewerApplication = {
|
|||
this.pdfLinkService.setDocument(null, null);
|
||||
}
|
||||
|
||||
this.findController.reset();
|
||||
|
||||
if (typeof PDFBug !== 'undefined') {
|
||||
PDFBug.cleanup();
|
||||
}
|
||||
|
@ -804,8 +806,6 @@ var PDFViewerApplication = {
|
|||
var self = this;
|
||||
scale = scale || UNKNOWN_SCALE;
|
||||
|
||||
this.findController.reset();
|
||||
|
||||
this.pdfDocument = pdfDocument;
|
||||
|
||||
this.pdfDocumentProperties.setDocumentAndUrl(pdfDocument, this.url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue