Prevent searching from breaking when opening a new file in the web viewer

This commit is contained in:
Jonas 2013-08-22 20:03:51 +02:00
parent 79c57dc04e
commit baba41f702
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -827,6 +827,8 @@ var PDFView = {
};
}
PDFFindController.reset();
this.pdfDocument = pdfDocument;
var errorWrapper = document.getElementById('errorWrapper');