From beddf586d12c716c1067ab2601d3105049c2fe03 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 31 Dec 2013 16:40:24 +0530 Subject: [PATCH] fix scrolling up in pdfs --- static/pdf.js/pdf.js | 2 +- static/pdf.js/pdf.worker.js | 2 +- static/pdf.js/viewer.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/static/pdf.js/pdf.js b/static/pdf.js/pdf.js index fda47cbe..5307a4f9 100644 --- a/static/pdf.js/pdf.js +++ b/static/pdf.js/pdf.js @@ -21,7 +21,7 @@ if (typeof PDFJS === 'undefined') { } PDFJS.version = '0.8.798'; -PDFJS.build = '25c476a'; +PDFJS.build = '5cd9fec'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/static/pdf.js/pdf.worker.js b/static/pdf.js/pdf.worker.js index 3868c881..cb4bf53f 100644 --- a/static/pdf.js/pdf.worker.js +++ b/static/pdf.js/pdf.worker.js @@ -21,7 +21,7 @@ if (typeof PDFJS === 'undefined') { } PDFJS.version = '0.8.798'; -PDFJS.build = '25c476a'; +PDFJS.build = '5cd9fec'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/static/pdf.js/viewer.js b/static/pdf.js/viewer.js index 2c39cd8a..08cbaea1 100644 --- a/static/pdf.js/viewer.js +++ b/static/pdf.js/viewer.js @@ -4978,7 +4978,10 @@ function updateViewarea() { }); var href = PDFView.getAnchorUrl(pdfOpenParams); document.getElementById('viewBookmark').href = href; - document.location.hash = '#page=' + pageNumber; + document.getElementById('secondaryViewBookmark').href = href; + + // Update the current bookmark in the browsing history. + PDFHistory.updateCurrentBookmark(pdfOpenParams, pageNumber); } window.addEventListener('resize', function webViewerResize(evt) {