-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keyboard shortcuts to modals #2977
Conversation
12fc3d6
to
504d989
Compare
feat: confirm modal when enter is pressed fix: fix linter issues fix: update rebase and fix lint issues fix: remove duplicate code
504d989
to
9b79080
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! one small change required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see more accessibility happening!
ts/components/conversation/header/ConversationHeaderSelectionOverlay.tsx
Outdated
Show resolved
Hide resolved
01b493a
to
ce1dfd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚢
the focustrap on the selection overlay will grab the keys and do the acitons when it is mounted
ts/components/conversation/header/ConversationHeaderSelectionOverlay.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚢
Working off this PR #2281 which adds shortcuts for the 'Delete' and 'Backspace'
keys to delete a message when a user is in selection mode.
This PR extends additional keyboard shortcuts for modals created using the SessionConfirm dialog component, adding 'Escape' which will call the onClickCancelHandler to close the modal and 'Enter' which will call the onClickOkHandler. This should make navigating deletion dialogs easier.