Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore right-click copy when copy on select is enabled #4819

Merged
4 commits merged into from
Mar 10, 2020
Merged

Conversation

leonMSFT
Copy link
Contributor

@leonMSFT leonMSFT commented Mar 6, 2020

Summary of the Pull Request

Right clicking on a focused tab while Copy On Select is active currently copies any active selection. This is because PointerReleasedHandler doesn't check for the mouse button that was released.
During a mouse button release, only the left mouse button release should be doing anything.

PR Checklist

Validation Steps Performed

These are the scenarios I've tested. They're a combination of in focus/out of focus, Copy On Select on/off, left/right click pressed and their move and release variants.

From Out of Focus:

  • Left Click = Focus
  • Left Click Move = Focus + Selection
  • Left Click Release
    • CoS on = Copy
    • CoS off = Nothing
  • Shift Left Click = Focus
  • Right Click
    • Focus
    • CoS on = Paste
    • CoS off = Copy if Active Selection, Paste if not.
  • Right Click Move = Nothing
  • Right Click Release = Nothing

From In Focus

  • Left Click = Selection if CoS off
  • Left Click Move = Selection
  • Left Click Release
    • CoS on = Copy
    • CoS off = Nothing
  • Shift Left Click = Set Selection Anchor
  • Right Click
    • CoS on = Paste
    • CoS off = Copy if Active Selection, Paste if not.
  • Right Click Move = Nothing
  • Right Click Release = Nothing

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 6, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 6, 2020
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@leonMSFT leonMSFT added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) AutoMerge Marked for automatic merge by the bot when requirements are met labels Mar 10, 2020
@ghost
Copy link

ghost commented Mar 10, 2020

Hello @leonMSFT!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit dd8813e into master Mar 10, 2020
@ghost ghost deleted the dev/lelian/cos branch March 10, 2020 14:59
abhijeetviswam pushed a commit to abhijeetviswam/terminal that referenced this pull request Mar 12, 2020
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
Right clicking on a focused tab while Copy On Select is active currently copies any active selection. This is because `PointerReleasedHandler` doesn't check for the mouse button that was released. 
During a mouse button release, only the left mouse button release should be doing anything.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes microsoft#4740
* [x] CLA signed.
* [x] Tests added/passed

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
These are the scenarios I've tested. They're a combination of in focus/out of focus, Copy On Select on/off, left/right click pressed and their move and release variants.

From Out of Focus:
- Left Click = Focus
- Left Click Move = Focus + Selection
- Left Click Release
  - CoS on = Copy
  - CoS off = Nothing
- Shift Left Click = Focus
- Right Click 
  - Focus 
  - CoS on = Paste
  - CoS off = Copy if Active Selection, Paste if not.
- Right Click Move = Nothing
- Right Click Release = Nothing

From In Focus
- Left Click = Selection if CoS off
- Left Click Move = Selection
- Left Click Release
  - CoS on = Copy
  - CoS off = Nothing
- Shift Left Click = Set Selection Anchor
- Right Click 
  - CoS on = Paste
  - CoS off = Copy if Active Selection, Paste if not.
- Right Click Move = Nothing
- Right Click Release = Nothing
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate copyOnSelect actions part 2
3 participants