Prevent searching from breaking when opening a new file in the web viewer
This commit is contained in:
parent
79c57dc04e
commit
baba41f702
@ -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…
x
Reference in New Issue
Block a user