Clear the browser selection when Cmd/Ctrl + Click or Shift + Click starts a multiselection - #5466
Merged
Merged
Conversation
…ction Co-Authored-By: GitHub Copilot CLI unknown <223556219+Copilot@users.noreply.github.com> Co-authored-by: BayuAri <8419585+BayuAri@users.noreply.github.com>
…ck starts a multiselection Co-Authored-By: GitHub Copilot CLI unknown <223556219+Copilot@users.noreply.github.com> Co-authored-by: BayuAri <8419585+BayuAri@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix faux caret activation on Define Term command
Clear the browser selection when Cmd/Ctrl + Click or Shift + Click starts a multiselection
Sep 9, 2026
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.
Running Define Term from the Command Universe on a Cmd + Click multiselection rendered a faux caret on every selected thought.
Cmd/Ctrl + Click and Shift + Click were the only multiselect entry points that left the caret in the clicked thought.
isMultiEditingreads that stale caret as an edited multiselection (Clear Thought), so when the Command Universe restored the selection it saved on open, it re-focused the editable and the faux carets appeared. Define Term is incidental — dismissing the palette with Escape produces the same result, and executing the command directly produces none.Changes
Thought.tsx—handleMultiselectclears the browser selection before toggling or extending the multicursors, asselectAllandcursorUp/cursorDownalready do. The check runs before the dispatch, since afterwards the clicked thought is itself a multicursor and a caret still in it would read as multi edit mode. It is skipped while the multiselection is being edited, where clearing the caret would blur the thought and exit the cleared state.multiselect.ts— Puppeteer regression test asserting nofaux-caret-multicursorafter Define Term runs on a Cmd + Click multiselection, plus an arrange-onlyacknowledgeAiDisclosurehelper (the disclosure modal otherwise takes focus and masks the bug).docs/cursor-and-caret.md— the click entry points now appear in the list that upholds the caret invariant, and the Command Universe is named alongside Copy Cursor as a surface that restores a saved selection.Side effect worth noting in review: Backspace and Escape on a Cmd + Click multiselection previously deferred to the browser because
isMultiEditingwas wrongly true, and now take the multiselect path.