[PR #4596] Fix duplicate copyOnSelect when clicking on an unfocused terminal #25860

Open
opened 2026-01-31 09:12:16 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4596

State: closed
Merged: Yes


Summary of the Pull Request

Currently, clicking on an unfocused terminal with a selection active will trigger copyOnSelect. This is because the check for copyOnSelect and copying to the clipboard is bound to when the Pointer is released. This works fine for when a user performs a click-drag selection, but it inadvertently also triggers when the user performs a single click on an unfocused terminal. We expect copyOnSelect to trigger only on the first time a selection is completed.

This PR will allow the user to single click on an unfocused terminal that has a selection active without triggering a copyOnSelect. It also ensures that any click-drag selection, whether it's on an unfocused or focused terminal, will trigger copyOnSelect.

PR Checklist

Validation Steps Performed

Performed manual testing involving permutations of multiple panes, tabs, in focus, and out of focus.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4596 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Currently, clicking on an unfocused terminal with a selection active will trigger `copyOnSelect`. This is because the check for `copyOnSelect` and copying to the clipboard is bound to when the Pointer is released. This works fine for when a user performs a click-drag selection, but it inadvertently also triggers when the user performs a single click on an unfocused terminal. We expect `copyOnSelect` to trigger only on the first time a selection is completed. This PR will allow the user to single click on an unfocused terminal that has a selection active without triggering a copyOnSelect. It also ensures that any click-drag selection, whether it's on an unfocused or focused terminal, will trigger copyOnSelect. ## PR Checklist * [x] Closes #4255 ## Validation Steps Performed Performed manual testing involving permutations of multiple panes, tabs, in focus, and out of focus.
claunia added the pull-request label 2026-01-31 09:12:16 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25860