mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #3338 from Snuffleupagus/history-wrong-pageNumber-fix
(Yet another) browsing history bug
This commit is contained in:
commit
2fa15a0d03
1 changed files with 4 additions and 2 deletions
|
@ -709,6 +709,7 @@ var PDFHistory = {
|
|||
this.currentPage = 0;
|
||||
this.updatePreviousBookmark = false;
|
||||
this.previousBookmark = '';
|
||||
this.previousPage = 0;
|
||||
this.nextHashParam = '';
|
||||
|
||||
this.fingerprint = fingerprint;
|
||||
|
@ -816,6 +817,7 @@ var PDFHistory = {
|
|||
this.currentPage = pageNum | 0;
|
||||
if (this.updatePreviousBookmark) {
|
||||
this.previousBookmark = this.currentBookmark;
|
||||
this.previousPage = this.currentPage;
|
||||
this.updatePreviousBookmark = false;
|
||||
}
|
||||
}
|
||||
|
@ -877,8 +879,8 @@ var PDFHistory = {
|
|||
if (this.previousBookmark === this.currentBookmark) {
|
||||
return null;
|
||||
}
|
||||
} else if (this.current.page) {
|
||||
if (this.current.page === this.currentPage) {
|
||||
} else if (this.current.page || onlyCheckPage) {
|
||||
if (this.previousPage === this.currentPage) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue