Skip to content

fix: arrow key navigation stops after clicking previous/next verse button (#14)#15

Open
sertunc wants to merge 1 commit intoacik-kuran:mainfrom
sertunc:fix/arrow-key-navigation-on-verse-button
Open

fix: arrow key navigation stops after clicking previous/next verse button (#14)#15
sertunc wants to merge 1 commit intoacik-kuran:mainfrom
sertunc:fix/arrow-key-navigation-on-verse-button

Conversation

@sertunc
Copy link

@sertunc sertunc commented Sep 23, 2025

Summary

This PR fixes the issue where arrow key navigation (← →) stopped working after clicking the "Previous Verse" or "Next Verse" buttons. The problem was caused by the button (Link) element retaining focus, which interfered with global keyboard event handling.

Fix Details

  • Added blur() on verse navigation buttons to remove focus after click.
  • Ensured that arrow key navigation continues to work regardless of where the user clicks on the page (except in input/textarea/select fields).

Related Issue

Closes #14

Copilot AI review requested due to automatic review settings September 23, 2025 19:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an accessibility and user experience issue where arrow key navigation was disabled after users clicked the Previous/Next Verse buttons. The problem occurred because the Link elements retained focus, preventing global keyboard event handling from working properly.

  • Added focus removal logic to verse navigation buttons to restore arrow key functionality
  • Ensures consistent keyboard navigation behavior regardless of user interaction method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sertunc sertunc changed the title fix: Arrow key navigation stops after clicking Previous/Next Verse button (#14) fix: arrow key navigation stops after clicking previous/next verse button (#14) Sep 23, 2025
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.

bug: arrow key navigation stops working after clicking previous/next verse button

2 participants