fix(chat): restore focus to chat input after closing keyboard shortcuts modal#823
Open
kareena0229 wants to merge 2 commits into
Open
fix(chat): restore focus to chat input after closing keyboard shortcuts modal#823kareena0229 wants to merge 2 commits into
kareena0229 wants to merge 2 commits into
Conversation
|
@kareena0229 is attempting to deploy a commit to the param20h's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #821
Summary
This PR improves keyboard accessibility by automatically restoring focus to the chat input after the Keyboard Shortcuts help modal is closed.
Users can now continue typing immediately without needing to manually click the input field.
Changes Made
Why This Change?
Previously, closing the Keyboard Shortcuts modal left keyboard focus undefined, requiring keyboard users to manually click the chat input before continuing.
This update provides a smoother and more accessible keyboard workflow while following common focus management practices.
Testing
✅ Modal closes via close button and focus returns to the chat input.
✅ Modal closes by clicking outside and focus returns to the chat input.
✅ Modal closes using the Esc key and focus returns to the chat input.
✅ Existing chat functionality remains unaffected.
✅ npm run build passes.
✅ npm run lint completes with no errors related to this change.
☑️ I have tested my changes locally.
☑️ My code follows the project's coding style.
☑️ This PR addresses issue [Enhancement] Restore Keyboard Focus to Chat Input After Closing Keyboard Shortcuts Modal #821.