Tweak the PDFHistory._tryPushCurrentPosition
method to work better with the different Scroll/Spread viewer modes
Given that a larger number of pages may now be visible at once, and importantly that their layout may be non-vertical, one of the conditions should be tweaked to not accidentally miss cases where a page is still visible. Please note: This patch is based on code-inspection, and the only ill effect occurring without it would be a couple of (near) duplicate history entries in some *rare* edge-cases.
This commit is contained in:
parent
9a1e51af24
commit
89e479dd6c
@ -329,8 +329,8 @@ class PDFHistory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let forceReplace = false;
|
let forceReplace = false;
|
||||||
if (this._destination.page === position.first ||
|
if (this._destination.page >= position.first &&
|
||||||
this._destination.page === position.page) {
|
this._destination.page <= position.page) {
|
||||||
// When the `page` of `this._destination` is still visible, do not
|
// When the `page` of `this._destination` is still visible, do not
|
||||||
// update the browsing history when `this._destination` either:
|
// update the browsing history when `this._destination` either:
|
||||||
// - contains an internal destination, since in this case we
|
// - contains an internal destination, since in this case we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user