diff --git a/web/chromecom.js b/web/chromecom.js index 581be863e..985ba9ca2 100644 --- a/web/chromecom.js +++ b/web/chromecom.js @@ -42,6 +42,9 @@ if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("CHROME")) { } AppOptions.set("defaultUrl", defaultUrl); + // Ensure that PDFViewerApplication.initialBookmark reflects the current hash, + // in case the URL rewrite above results in a different hash. + PDFViewerApplication.initialBookmark = location.hash.slice(1); })(); const ChromeCom = {