fix: lazy-load continuous-reader pages beyond an eager window
Continuous mode rendered every page (up to 2000) with loading="eager", fetching and decoding the whole chapter up front — enough to OOM a mobile tab on a long chapter. Eager-load only a leading window ([0..=eagerThrough], covering the deep-link target + a lead, min 6 pages) and lazy-load the rest; the browser fetches them as the reader scrolls near. Unloaded lazy pages reserve height (page width x ~1.4) so they stay distinct scroll targets for the progress IntersectionObserver, cleared on load. Keeps the DOM dense so the scroll-to-?page=N effect, progress observer, and next-chapter preload trigger are all unchanged. Rewrote reader-preload-window spec to assert the eager/lazy attribute partition + deep-link scroll landing. Bump to 0.124.2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mangalord-frontend",
|
||||
"version": "0.124.1",
|
||||
"version": "0.124.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user