Repository navigation
fix(web): a new thread you ask for puts the cursor in the message box - #910
Merged
Merged
Conversation
A new empty thread opened without focus in its composer, so after Cmd+N (or the New thread button, or the command palette) typing went nowhere until a click in the box. Asking for a new thread now requests focus for that draft, and the ChatView showing it answers once, whether it was already on screen or mounts after the navigation. The draft the app opens by itself at launch still leaves the keyboard alone, and so do touch devices, where focus would open the keyboard.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
Problem
After Cmd+N (or the New thread button, or a new thread from the command palette) the cursor was not in the message box. Typing went nowhere until you clicked the box. A new empty thread opened without focus on purpose, so the app does not grab the keyboard when it opens, but that rule also caught new threads the user asked for.
Fix
Asking for a new thread now requests focus for that draft (
newThreadComposerFocus.ts), and the ChatView showing the draft answers once, whether it was already on screen or mounts after the navigation.focusComposer: false).Checks
vp fmt,vp lint,vp run typecheck