diff --git a/web/pdf_find_bar.js b/web/pdf_find_bar.js index c004017a7..d13d39494 100644 --- a/web/pdf_find_bar.js +++ b/web/pdf_find_bar.js @@ -87,7 +87,7 @@ class PDFFindBar { this.dispatchEvent("diacriticmatchingchange"); }); - this.eventBus._on("resize", this._adjustWidth.bind(this)); + this.eventBus._on("resize", this.#adjustWidth.bind(this)); } reset() { @@ -130,7 +130,7 @@ class PDFFindBar { findMsg.then(msg => { this.findMsg.textContent = msg; - this._adjustWidth(); + this.#adjustWidth(); }); this.updateResultsCount(matchesCount); @@ -165,7 +165,7 @@ class PDFFindBar { this.findResultsCount.textContent = msg; // Since `updateResultsCount` may be called from `PDFFindController`, // ensure that the width of the findbar is always updated correctly. - this._adjustWidth(); + this.#adjustWidth(); }); } @@ -179,7 +179,7 @@ class PDFFindBar { this.findField.select(); this.findField.focus(); - this._adjustWidth(); + this.#adjustWidth(); } close() { @@ -202,10 +202,7 @@ class PDFFindBar { } } - /** - * @private - */ - _adjustWidth() { + #adjustWidth() { if (!this.opened) { return; }