From 3a27461598b20c407bbcde7c752b88a339d2294e Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 28 Nov 2025 22:49:35 +0100 Subject: [PATCH] Prevent triggering load of already loaded image This caused the reader to "jump to random pages" because it caused the image to get unrendered and rendered again, leading to layout shifts. This issue existed already for a long time but could only rarely be observed because of the hacky "cache check" logic. The changes from 9ed05f3fc0e61d882c56b61bac4df2684110510e caused this issue to be consistent in case the new service worker could not get installed due to not meeting the required installation prerequisites. If that was the case, the cache check always returned false causing the above-described behavior. fixes #929 --- CHANGELOG.md | 3 ++- src/base/components/SpinnerImage.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d1d3cd..cdd6e87a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Reader**) Fix mouse cursor drift during drag scroll - (**Reader**) Fix deletion of chapters while reading - (**Reader**) Fix potential page loss (continuous horizontal mode window resize, reader width change, page scale change) - (**Reader**) Fix current page detection in continuous horizontal mode with right-to-left reading mode +- (**Reader**) Fix current page detection in continuous horizontal mode with right-to-left reading mode +- (**Reader**) Fix occasionally jumping to random pages in continuous reading modes - (**Extension**) Fix handling obsolete extensions as updatable in case they are marked as having an available update - (**Theme**) Fix loading of fonts defined in themes - (**Reader**) Fix broken scrolling in continuous horizontal reading mode diff --git a/src/base/components/SpinnerImage.tsx b/src/base/components/SpinnerImage.tsx index ce485676..8d3af737 100644 --- a/src/base/components/SpinnerImage.tsx +++ b/src/base/components/SpinnerImage.tsx @@ -96,7 +96,7 @@ export const SpinnerImage = ({ ref, ...props }: SpinnerImageProps) => { ); useEffect(() => { - if (showMissingImageIcon || !shouldLoad) { + if (showMissingImageIcon || !shouldLoad || !!imageSourceUrl) { return () => {}; }