diff --git a/pdf/src/document.js b/pdf/src/document.js index 688db2684e..88dd6891e6 100644 --- a/pdf/src/document.js +++ b/pdf/src/document.js @@ -1168,6 +1168,11 @@ var CPresentation = CPresentation || function(){}; }; CPDFDoc.prototype.SetNeedUpdateSearch = function(bUpdate) { this.needUpdateSearch = bUpdate; + + if (bUpdate && this.SearchEngine.TextAroundTimer != null) { + clearTimeout(this.SearchEngine.TextAroundTimer); + this.SearchEngine.TextAroundTimer = null; + } }; CPDFDoc.prototype.IsNeedUpdateSearch = function() { return this.needUpdateSearch;