Skip to content

fix: replace window.location navigation and remove keyboard focus trap in ShortcutsModal (fixes #4027)#4036

Merged
Premshaw23 merged 2 commits into
Premshaw23:masterfrom
AMAN194701:fix/4027-shortcutsmodal-focus-reload
Jul 17, 2026
Merged

fix: replace window.location navigation and remove keyboard focus trap in ShortcutsModal (fixes #4027)#4036
Premshaw23 merged 2 commits into
Premshaw23:masterfrom
AMAN194701:fix/4027-shortcutsmodal-focus-reload

Conversation

@AMAN194701

Copy link
Copy Markdown
Contributor

Closes #4027

Description

This PR fixes two issues in ShortcutsModal:

  • Replaced window.location.href navigation with router.push() to preserve SPA navigation.
  • Removed the forced Tab key focus override that trapped keyboard focus on the close button, allowing normal keyboard navigation within the modal.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Verification & Testing

  1. Verified shortcut navigation now uses Next.js client-side routing.
  2. Confirmed keyboard navigation is no longer trapped on the close button.
  3. Ensured no unrelated files or code changes were introduced.

Checklist

  • My code follows the style guidelines of this project.
  • My changes generate no new warnings or console errors.
  • I have performed a self-review of my own code.
  • No unrelated files or code changes are included.

@Premshaw23 Premshaw23 added good first issue Good for newcomers gssoc:approved level:beginner mentor:Ayushh-Sharmaa GSSoC: Mentor — @Ayushh-Sharmaa GSSoC'26 Part of GirlScript Summer of Code 2026 mentor:leonagoel GSSoC'26 Mentor: @leonagoel labels Jul 17, 2026
@Premshaw23
Premshaw23 merged commit 78c4080 into Premshaw23:master Jul 17, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers gssoc:approved GSSoC'26 Part of GirlScript Summer of Code 2026 level:beginner mentor:Ayushh-Sharmaa GSSoC: Mentor — @Ayushh-Sharmaa mentor:leonagoel GSSoC'26 Mentor: @leonagoel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] : ShortcutsModal traps keyboard focus on close button and causes full page reloads via window.location.href

2 participants