From 5cb3df7bde95b0310e20493943c02216b45127c6 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 5 Jun 2013 16:02:29 +0200 Subject: [PATCH] (Yet another) browsing history bug --- web/viewer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/viewer.js b/web/viewer.js index bbb3371aa..678b0fc78 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -707,6 +707,7 @@ var PDFHistory = { this.currentPage = 0; this.updatePreviousBookmark = false; this.previousBookmark = ''; + this.previousPage = 0; this.nextHashParam = ''; this.fingerprint = fingerprint; @@ -814,6 +815,7 @@ var PDFHistory = { this.currentPage = pageNum | 0; if (this.updatePreviousBookmark) { this.previousBookmark = this.currentBookmark; + this.previousPage = this.currentPage; this.updatePreviousBookmark = false; } } @@ -875,8 +877,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 {