Skip to content

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

@sertunc

Description

@sertunc

Bug Description

The arrow key navigation (← →) works correctly for moving between verses/pages. However, when the user clicks the "Previous Verse" or "Next Verse" button, the arrow key navigation stops working. It only starts working again after clicking somewhere else on the page.

Expected Behavior

Arrow key navigation should continue to work even after clicking the navigation buttons.

Steps to Reproduce

  1. Open any surah page.
  2. Use the left/right arrow keys (← →) to navigate between verses → Works fine.
  3. Click the "Next Verse" button.
  4. Try using the arrow keys again → No navigation happens.
  5. Click somewhere on the page background.
  6. Try arrow keys again → Navigation works again.

Possible Cause

  • After clicking, the focus remains on the <Link> (which renders as an <a> element).
  • The global keydown event may not be captured properly while the link retains focus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions