Skip to content

feat: make keyboard shortcuts safe in text-entry contexts - #1497

Merged
greatest0fallt1me merged 1 commit into
Streampay-Org:mainfrom
martinshub-tech:fix-keyboard-shortcuts-final
Aug 30, 2026
Merged

feat: make keyboard shortcuts safe in text-entry contexts#1497
greatest0fallt1me merged 1 commit into
Streampay-Org:mainfrom
martinshub-tech:fix-keyboard-shortcuts-final

Conversation

@martinshub-tech

Copy link
Copy Markdown
Contributor

Closes #1422

Here is what I did:

Created a robust utility function isTextEntry in
lib/keyboard.ts
to deterministically check whether an event target is an input (excluding buttons/checkboxes), textarea, select, or contenteditable element.
Updated
app/components/ShortcutsOverlay.tsx
so the ? shortcut no longer triggers while typing in a text field.
Updated
app/ReceiptCard.tsx
to use the new isTextEntry function for its c and m shortcuts, hardening it across all contexts (including content editables).
Updated
app/CreateStreamForm.tsx
to ensure the Alt+R and Alt+A shortcuts do not steal focus if the user happens to press them (or AltGr variants) while actively typing in a different text field, while maintaining their navigational intent outside of text entries.
Ran the relevant unit tests (such as app/CreateStreamForm.test.tsx and app/components/ShortcutsOverlay.test.tsx) locally, which all passed.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@martinshub-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit 11388ec into Streampay-Org:main Aug 30, 2026
1 check passed
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.

[Quality-2][High] Make keyboard shortcuts safe in text-entry contexts

2 participants