diff --git a/web/pdf_history.js b/web/pdf_history.js index 9c7a4de1c..7c02dbe34 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -329,8 +329,8 @@ class PDFHistory { } let forceReplace = false; - if (this._destination.page === position.first || - this._destination.page === position.page) { + if (this._destination.page >= position.first && + this._destination.page <= position.page) { // When the `page` of `this._destination` is still visible, do not // update the browsing history when `this._destination` either: // - contains an internal destination, since in this case we