From fc73dbe69558f7dd6d4c157569114b779b839b7e Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 14 Sep 2013 17:14:04 +0200 Subject: [PATCH] [PDFHistory] Prevent the history from skipping entries in certain edge cases, when specifying an initialBookmark in the hash parameters on document load --- web/pdf_history.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/pdf_history.js b/web/pdf_history.js index be8b72217..47c73a309 100644 --- a/web/pdf_history.js +++ b/web/pdf_history.js @@ -202,10 +202,14 @@ var PDFHistory = { } return; } - if (this.nextHashParam && this.nextHashParam === params.hash) { - this.nextHashParam = null; - this.updatePreviousBookmark = true; - return; + if (this.nextHashParam) { + if (this.nextHashParam === params.hash) { + this.nextHashParam = null; + this.updatePreviousBookmark = true; + return; + } else { + this.nextHashParam = null; + } } if (params.hash) {