From 6905219567a871ce67eea69fb2ac198310e7f1e2 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Mon, 6 Jul 2026 16:14:54 +0200 Subject: [PATCH] Fix PDF-parsing progress pill drifting toward the bottom (v1.14.1) It used position:sticky with a top:40vh offset - sticky's containing block grows with the document, so on a long PDF the pill drifted toward the bottom instead of staying a fixed distance from the viewport's actual visible top. Switched to position:fixed. Also investigated a "characters all gone" report: verified directly in the SQLite database that all 47 records for the book are intact, and a fresh browser session renders them correctly with no errors - this was a transient/stale-page display issue, not data loss. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 7 +++++++ VERSION | 2 +- static/index.html | 6 +++--- static/js/reader.js | 6 +++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99aaf3f..7f6b8fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi --- +## [1.14.1] — 2026-07-06 + +### Fixed +- **"Reading PDF… page N" indicator drifted toward the bottom of the screen on long documents** — it used `position: sticky` with a `top: 40vh` offset, whose containing block grew with every page appended during parsing, so the pill drifted downward instead of staying a fixed distance from the actual visible top of the viewport. Switched to `position: fixed`, anchored near the top regardless of document length. + +--- + ## [1.14.0] — 2026-07-06 ### Added diff --git a/VERSION b/VERSION index 850e742..63e799c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.14.0 +1.14.1 diff --git a/static/index.html b/static/index.html index af2b3d5..a31fe8c 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,7 +27,7 @@ - + @@ -365,7 +365,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/reader.js b/static/js/reader.js index f24df0a..322174f 100644 --- a/static/js/reader.js +++ b/static/js/reader.js @@ -609,7 +609,11 @@ function readerShowParseProgress(total) { const el = document.createElement('div'); el.className = 'reader-parsing'; el.innerHTML = ' Reading PDF… page 0 / ' + total + ''; - el.style.cssText = 'position:sticky; top:40vh; z-index:100; margin:0 auto -64px; background:var(--accent); color:#fff; padding:14px 28px; border-radius:32px; font-size:18px; display:inline-flex; align-items:center; gap:12px; box-shadow:0 6px 24px rgba(0,0,0,.35); font-weight:700;'; + // Fixed to the viewport (not sticky within the doc pane) — sticky's + // top:40vh drifted toward the bottom on long documents since its + // containing block grew with every page appended, instead of staying + // anchored a fixed distance from the actual visible top of the screen. + el.style.cssText = 'position:fixed; top:80px; left:50%; transform:translateX(-50%); z-index:100; background:var(--accent); color:#fff; padding:14px 28px; border-radius:32px; font-size:18px; display:inline-flex; align-items:center; gap:12px; box-shadow:0 6px 24px rgba(0,0,0,.35); font-weight:700;'; doc.insertBefore(el, doc.firstChild); const label = el.querySelector('span:last-child'); return {