Skip to content

Make mouse back/forward buttons navigate reader history - #1

Merged
TheBabu merged 1 commit into
masterfrom
claude/mouse-back-forward-nav-4f6sm1
Jun 30, 2026
Merged

Make mouse back/forward buttons navigate reader history#1
TheBabu merged 1 commit into
masterfrom
claude/mouse-back-forward-nav-4f6sm1

Conversation

@TheBabu

@TheBabu TheBabu commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Mouse "back"/"forward" side buttons previously triggered the browser's own navigation instead of moving through the reader's internal view history, unlike Alt+Left/Right and dedicated keyboard browser-back/forward keys, which already call reader.navigateBack()/navigateForward().
  • Added a mouseup listener in KeyboardManager (the default browser action for these buttons fires on mouseup, not mousedown/pointerdown) that intercepts button === 3 (back) and button === 4 (forward), prevents the default navigation, and calls this._reader.navigateBack() / navigateForward() instead.

Test plan

  • Open a PDF, click a few internal links/annotations to build view history, then verify the mouse back button returns to the previous view and forward returns to the next view, matching Alt+Left/Right behavior.

Generated by Claude Code

Mouse side buttons (back/forward) previously triggered the browser's
own navigation instead of the reader's internal navigateBack/
navigateForward, unlike the equivalent Alt+Left/Right shortcuts and
dedicated keyboard browser-back/forward keys.
@TheBabu
TheBabu merged commit 5b59889 into master Jun 30, 2026
@TheBabu
TheBabu deleted the claude/mouse-back-forward-nav-4f6sm1 branch July 8, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants