From da34c77f0301886d5031630530a61c5518a05481 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 5 Apr 2025 12:50:14 +0200 Subject: [PATCH] Only observe "ReaderChapterViewer" resize events for scroll position preservation It's not necessary to observe all elements, since "ReaderChapterViewer" is the parent and thus increases/decreases in size in case its children change. --- src/modules/reader/hooks/useReaderPreserveScrollPosition.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/reader/hooks/useReaderPreserveScrollPosition.ts b/src/modules/reader/hooks/useReaderPreserveScrollPosition.ts index ee95e391..4a045be5 100644 --- a/src/modules/reader/hooks/useReaderPreserveScrollPosition.ts +++ b/src/modules/reader/hooks/useReaderPreserveScrollPosition.ts @@ -117,7 +117,6 @@ export const useReaderPreserveScrollPosition = ( }); mutationObserver.observe(element, { childList: true, - subtree: true, }); return () => {