From 0d712a7f2195ba8db90756bb470c1c951003f450 Mon Sep 17 00:00:00 2001 From: mrwnslz Date: Wed, 4 Nov 2026 14:35:03 +0100 Subject: [PATCH] =?UTF-8?q?PDF:=20=C3=96ffnen=20an=20der=20gespeicherten?= =?UTF-8?q?=20Seite=20zeigt=20kein=20=E2=80=9EWeit=20gescrollt=E2=80=9C=20?= =?UTF-8?q?mehr=20(sw=20CACHE=20v168)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- static/js/app/58-pdf.js | 6 +++++- static/js/sw.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/app/58-pdf.js b/static/js/app/58-pdf.js index 8fdd59e..5e7c99b 100644 --- a/static/js/app/58-pdf.js +++ b/static/js/app/58-pdf.js @@ -630,7 +630,11 @@ async function renderPdf(arrayBuffer, contentEl, scaleOverride, pivotPage) { return _pdfResult(pdf, extras); } - if (pivot > 1) entries[pivot - 1].wrapper.scrollIntoView({block: 'start'}); + // Opening at the saved page is no "scrolled far" (44-books.js). + if (pivot > 1) { + if (typeof _suppressScrollJumpDetect === 'function') _suppressScrollJumpDetect(); + entries[pivot - 1].wrapper.scrollIntoView({block: 'start'}); + } pdfCurrentPage = pivot; const byEl = new Map(entries.map(e => [e.wrapper, e])); diff --git a/static/js/sw.js b/static/js/sw.js index e617f7f..711116c 100644 --- a/static/js/sw.js +++ b/static/js/sw.js @@ -2,7 +2,7 @@ * diora service worker — caches the app shell for offline use. */ -const CACHE = 'diora-v167'; +const CACHE = 'diora-v168'; const SHELL = [ '/static/css/app.css', '/static/js/app/01-core.js',