Skip to content

Commit a6db791

Browse files
authored
Merge pull request Gnathonic#243 from Gnathonic/fix/reader-scrollbars
fix: Prevent scrollbars in reader by hiding document overflow
2 parents 970a209 + e01fbfc commit a6db791

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lib/components/Reader/Reader.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,14 @@
348348
});
349349
}
350350
351+
// Prevent scrollbars from appearing when in reader mode
352+
document.documentElement.style.overflow = 'hidden';
353+
351354
return () => {
352355
// Stop activity tracker when component unmounts
353356
activityTracker.stop();
357+
// Restore overflow when leaving reader
358+
document.documentElement.style.overflow = '';
354359
};
355360
});
356361

0 commit comments

Comments
 (0)