mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #3612 from Snuffleupagus/fix-find-when-loading-new-file
Prevent searching from breaking when opening a new file in the web viewer
This commit is contained in:
commit
e9a3ac175c
2 changed files with 8 additions and 0 deletions
|
@ -87,6 +87,12 @@ var PDFFindController = {
|
|||
}
|
||||
},
|
||||
|
||||
reset: function pdfFindControllerReset() {
|
||||
this.startedTextExtraction = false;
|
||||
this.extractTextPromises = [];
|
||||
this.active = false;
|
||||
},
|
||||
|
||||
calcFindMatch: function(pageIndex) {
|
||||
var pageContent = this.pageContents[pageIndex];
|
||||
var query = this.state.query;
|
||||
|
|
|
@ -827,6 +827,8 @@ var PDFView = {
|
|||
};
|
||||
}
|
||||
|
||||
PDFFindController.reset();
|
||||
|
||||
this.pdfDocument = pdfDocument;
|
||||
|
||||
var errorWrapper = document.getElementById('errorWrapper');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue