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
@ -87,6 +87,12 @@ var PDFFindController = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
reset: function pdfFindControllerReset() {
|
||||||
|
this.startedTextExtraction = false;
|
||||||
|
this.extractTextPromises = [];
|
||||||
|
this.active = false;
|
||||||
|
},
|
||||||
|
|
||||||
calcFindMatch: function(pageIndex) {
|
calcFindMatch: function(pageIndex) {
|
||||||
var pageContent = this.pageContents[pageIndex];
|
var pageContent = this.pageContents[pageIndex];
|
||||||
var query = this.state.query;
|
var query = this.state.query;
|
||||||
|
@ -827,6 +827,8 @@ var PDFView = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PDFFindController.reset();
|
||||||
|
|
||||||
this.pdfDocument = pdfDocument;
|
this.pdfDocument = pdfDocument;
|
||||||
|
|
||||||
var errorWrapper = document.getElementById('errorWrapper');
|
var errorWrapper = document.getElementById('errorWrapper');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user