-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Don't scroll vertically on horizontal scroll motions #10979
Conversation
|
||
// GH#10329 - we don't need to handle horizontal scrolls. Only vertical ones. | ||
// So filter out the horizontal ones. | ||
if (point.Properties().IsHorizontalMouseWheel()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thatwaseasy.gif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it call args.Handled()
though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that since we are not handling it, we should not mark it handled. Somebody else might want it 😄
Hello @DHowett! Because this pull request has the 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 (
|
{ | ||
return; | ||
} | ||
|
||
auto result = _interactivity.MouseWheel(ControlKeyStates{ args.KeyModifiers() }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, quick question: it looks like this'll suppress the _core->SendMouseEvent
in ControlInteractivity, is that ok? We don't want the VT mouse mode data anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for horizontal wheel we don't.
## Summary of the Pull Request Pretty straightforward. Check if the scroll event is a horizontal movement. If it is, ignore it. We don't have a horizontal scrollbar. ## References * obviously, revisit this if we ever do #1860 ## PR Checklist * [x] Closes #10329 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed * scrolled ↑/↓ with slaptop trackpad: terminal scrolls. * scrolled ←/→ with slaptop trackpad: terminal doesn't scroll. * Scrolling _slightly more vertically than horizontally_ still scrolls. * Scrolling _slightly more horizontally than vertically_ doesn't scroll.
🎉 Handy links: |
🎉 Handy links: |
Summary of the Pull Request
Pretty straightforward. Check if the scroll event is a horizontal movement. If it is, ignore it. We don't have a horizontal scrollbar.
References
PR Checklist
Validation Steps Performed