Repository navigation
feat: add middle mouse button scrolling - #245882
Conversation
|
@microsoft-github-policy-service agree |
|
I can create more tests but I wanted to get an idea if this was the right way to add middle button scrolling first. I didn't get any response on #6302 (comment) |
|
This is literally life-saving and I would pay $5 a month for this feature. |
|
Silly question: does it block text paste on X11 with middle click?
However, the extension is closed source. |
The setting is off by default so it should not prevent paste on middle click but when turned on it will prevent it. This does have two separate modes currently. If the user holds down the middle button and moves the cursor around it will cancel the scrolling on mouse up, and if the user clicks the middle button the scrolling will continue until the middle button is clicked again. Maybe this could be two settings so holding the button will scroll and clicking the button will paste? |
1737353 to
c56983b
Compare
|
A beautiful attemp after 8 years of waiting!!! HYPPE! |
If the 2 behavior can be implemented, that would be perfect. But for Linux users, it would be a really pain that middle click doesn't paste, so I would much prefer the second solution (scroll on hold) |
|
It looks like the tests are failing because Is there something different I need to do in the tests to get |
d2677da to
7924c9a
Compare
|
Glandos (@Glandos) could you test this with linux and paste on middle click? I don't have a linux setup to test. Is paste on middle click on mousedown or mouseclick? |
I'm sorry to ask a silly question: how do you test this? Is there a CI job that build a version for each PR? |
c0d951d to
38b9bfb
Compare
a1b3c38 to
56b3619
Compare
|
Glandos (@Glandos) I don't think there is a binary built for each CI run. Henning Dieterichs (@hediet) is there an easy way to test this on Linux? Otherwise this is at least off by default so it won't change the behavior. If there is a bug on Linux we can fix it after release. |
56b3619 to
fc51d62
Compare
|
We're still waiting for this amazing feature, 8y later! |
fc51d62 to
9651260
Compare
|
I was able to setup a linux vm and test this with paste on middle click. What I have found is that scroll on middle button and paste on middle click cannot be used together because scroll on middle button requires a mouse down events. Knowing before the mouse down event which one the user intends is not likely possible. Possible solutions:
Henning Dieterichs (@hediet) thoughts? |
|
The current situation is that we have 3 settings that can determine what happens on middle button click:
I think it would be good to change it to one setting that is a dropdown but that can be done after this PR |
|
Thanks for testing on linux!
I refactored the code change in the mouse dispatching logic a bit (shouldn't change anything though), to go from one special case with a special case exclusion to two special cases. I'm not very familiar with the middle mouse button pasting mechanism on linux, but if this only gets a problem if the user turns on two middle mouse button features, it is okay that they conflict (and one of them does not work). I was on vacation again and I think this needs a little more polishing and testing, so let's try to merge it early next iteration (i.e. next week)! |
We can put the listeners on whatever element we want but the user will have to mouse up/down/move on that element in order to affect the scrolling. In other words, if we put the listeners only on the editor and someone clicks the middle button to start scrolling they can only stop scrolling by clicking the editor again. If they click or mouse up outside of the editor it won't stop scrolling. |
|
Henning Dieterichs (@hediet) anything else we need to do to merge this? |
|
I noticed some more problematic things, so I introduced observables in your implementation. I think we can merge it now!
However, I didn't figure out a quick way to write tests for this new implementation. Thanks for the PR again! Are you up to write release notes for your feature and provide some testing steps or test the feature yourself? :) |
|
One thing I noticed in testing is that your changes removed the scroll on click and only left the scroll on holding the middle mouse button down. I think that is a good start, but I know from adding this to Atom that a lot of people prefer clicking the middle button then moving the mouse then clicking again to end scrolling. |
Good point, missed that! Fixed in #251393. |
|
Can we have this scroll-lock behaviour optional, please? Scroll lock is particularly annoying for left-handed people, like me, who accidentally hit the middle mouse button frequently. For reference, see this Bugzilla issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1923233 |
If there is enough demand, I'm up to add a setting for this (default with scroll lock though, as at least chrome also works like that). |
|
Thanks for considering my concerns. Feature request created: #251609 |
Add middle mouse button scrolling
fixes #6302