From a4491c6bfd433a1da877f7280c51a68183c7f5fe Mon Sep 17 00:00:00 2001 From: jenken827 Date: Sat, 12 Sep 2026 22:31:06 +0800 Subject: [PATCH] fix(reader): make PDF edge taps page-turn on first click Tapping the left/right zones in a PDF (fixed-layout) book only revealed the toolbar on the first tap; a second tap was required to turn the page. EPUB was unaffected. useAutoHideControls had an early return for fixed-layout that short- circuited before the tap-zone logic whenever the controls were hidden: if (isFixedLayout && !isVisible) { showAndScheduleHide(); return; } Since controls start hidden after the auto-hide delay, the first tap on an edge zone hit that branch, showed the menu, and returned before reaching onPrev/onNext. The second tap fell through (isVisible now true) and finally paged. Removing the special case lets PDF/CBZ use the same left/right-nav, middle-toggle zone logic as EPUB, so the first tap acts. --- packages/app/src/components/reader/ReaderView.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/app/src/components/reader/ReaderView.tsx b/packages/app/src/components/reader/ReaderView.tsx index ade0140b9..5495728f0 100644 --- a/packages/app/src/components/reader/ReaderView.tsx +++ b/packages/app/src/components/reader/ReaderView.tsx @@ -308,18 +308,6 @@ function useAutoHideControls( rightNavStart, }); - if (isFixedLayout && !isVisible) { - console.log("[ReaderTap][reader:action]", { - bookKey, - source, - action: "show-controls", - fraction, - isDoublePage, - }); - showAndScheduleHide(); - return; - } - if (isScrollMode) { toggleControls(); return; @@ -372,7 +360,6 @@ function useAutoHideControls( isDoublePage, isScrollMode, isFixedLayout, - isVisible, ]); // Mouse enter/leave handlers for toolbar area