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

Quickly dragging a tab into the terminal area that has text selected modifies that selection #4603

Closed
1kjo opened this issue Feb 15, 2020 · 2 comments · Fixed by #10650
Closed
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@1kjo
Copy link
Contributor

1kjo commented Feb 15, 2020

Environment

Windows build number:  10.0.18362.0
Windows Terminal version (if applicable): master (941a44a46491e1a018419eb24c9d92d3b2640e55)

Any other software?

Steps to reproduce

  1. Make a selection.
  2. Quickly drag a tab onto the terminal area.

Expected behavior

The selection is not modified.

Actual behavior

The selection is modified.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Feb 15, 2020
@1kjo 1kjo changed the title Dragging a tab into the terminal area that has text selected modifies that selection Quickly dragging a tab into the terminal area that has text selected modifies that selection Feb 15, 2020
@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Feb 18, 2020
@DHowett-MSFT DHowett-MSFT added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) labels Feb 21, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Feb 21, 2020
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.0 milestone Feb 21, 2020
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Feb 21, 2020
@DHowett-MSFT
Copy link
Contributor

Marking this as a v1.0 P3 polish issue; we will discuss it during the next v1 scrub.

@zadjii-msft zadjii-msft self-assigned this Jul 13, 2021
zadjii-msft added a commit that referenced this issue Jul 13, 2021
  Kinda the same thing. Don't modify the selection if the pointer down drag
  didn't even start in the control to begin with.
@ghost ghost added the In-PR This issue has a related PR label Jul 13, 2021
@ghost ghost closed this as completed in #10650 Jul 28, 2021
ghost pushed a commit that referenced this issue Jul 28, 2021
## Summary of the Pull Request

This fixes two bugs related to dragging into the bounds of the `TermControl`. Although the fixes are fairly small, I'm batching them up, because I don't want to stack 2 more PRs on top of #10051.

* #9109 
  - This is fixed by only starting an autoscroll if the click&drag actually started within the bounds of the control. 
* #4603
  - Building on the above change, only modify the selection when the drag started in the control. 
 
## References
* srsly go read #10051.

## PR Checklist
* [x] Closes #9109
* [x] Closes #4603
* [x] I work here
* [x] Test added
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

This is kind of annoying that the auto-scrolling is handled by the TermControl, but it uses a timer that's still a WinUI construct.

We only want to start the auto-scrolling behavior when the drag started _inside_ the control. Otherwise, in the tab drag scenario, dragging into the bounds of the TermControl will trick it into thinking it should start a scroll.
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Jul 28, 2021
@ghost
Copy link

ghost commented Aug 31, 2021

🎉This issue was addressed in #10650, which has now been successfully released as Windows Terminal Preview v1.11.2421.0.:tada:

Handy links:

This issue 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.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants