Repository navigation
fix(web): a late frame after Tab no longer collapses the words you selected - #982
Merged
Merged
Conversation
…lected Tab completion, menu picks, prompt recall, filling a prompt and restoring a stash write the message box and then put the cursor in place a frame later. A busy page draws that frame late, after the user's next keys: the cursor then jumped back and a selection made since collapsed. That is why the composer suggestion browser test failed on CI under load: its Tab's focus landed after it retyped and selected two letters. The put-off focus now leaves the box alone when it no longer holds what was written or words are selected in it (focusAfterWrite; the editor handle gains hasSelectedText). A browser test holds Tab's frame back until after the selection and fails without the fix. The real-list selection test's check also gets the file's AFTER_SCROLL wait instead of the default second; the assertion is the same.
|
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.
A composer browser test ("keeps the rest of the suggestion after the cursor while typing its first words") started failing in main's merge queue some of the time. It is a real bug for people on a busy machine, not only a test problem.
Tab completion, menu picks, prompt recall, filling a prompt and restoring a stash write the message box and then put the cursor in place one frame later. A busy page draws that frame late, after the user's next keys. The cursor then jumped back and any words selected since were deselected. In the test, Tab's late focus landed after it retyped and selected two letters, so the rest of the suggestion never hid.
The put-off focus now leaves the box alone when it no longer holds what was written, or when words are selected in it. The editor handle gains
hasSelectedText(). Two browser tests hold Tab's frame back until after the user's next keys: one retypes and selects, one only selects. Each fails without its half of the check.The real-list "keeps the selection and its actions when the list moves the text's row" check also gets the file's 5-second
AFTER_SCROLLwait instead of the default second. The assertion is unchanged; it failed in the same queue run under load.Checks: fmt, lint and typecheck pass. The web unit suite passes (255 files), and so does the full browser suite (111 files, 1,098 tests before the second test was added). Under heavy local load, the composer test never failed in three runs of browser job 1; other tests that depend on timing did.