Skip to content

Commit 46017aa

Browse files
committed
fix: disable vertical scrolling in reader with overflow-hidden and touch-action-none
1 parent ee406a8 commit 46017aa

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/features/reader/components/chapter-reader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const ChapterReader = forwardRef<ChapterReaderHandle, ChapterReaderProps>
112112
}
113113

114114
return (
115-
<div className="relative h-full">
115+
<div className="relative h-full overflow-hidden">
116116
{isLoading && (
117117
<div className="absolute inset-0 z-20 flex items-center justify-center bg-background/80">
118118
<div className="flex flex-col items-center gap-4">
@@ -123,7 +123,7 @@ export const ChapterReader = forwardRef<ChapterReaderHandle, ChapterReaderProps>
123123
)}
124124
<div
125125
ref={containerRef}
126-
className="relative h-full"
126+
className="relative h-full overflow-hidden"
127127
style={{ backgroundColor: themeColors.background }}
128128
/>
129129
{/* Click areas for navigation */}

src/features/reader/engine/chapter-renderer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class ChapterRenderer {
2626
this.viewport.style.position = 'absolute';
2727
this.viewport.style.inset = '0';
2828
this.viewport.style.overflow = 'hidden';
29+
this.viewport.style.touchAction = 'none';
2930

3031
this.content = document.createElement('div');
3132
this.content.className = 'reader-engine-content';

0 commit comments

Comments
 (0)