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

Autoscroll functionality for Linux / Mac #959

Closed
bsclifton opened this issue Sep 4, 2018 · 40 comments · Fixed by brave/brave-core#21874
Closed

Autoscroll functionality for Linux / Mac #959

bsclifton opened this issue Sep 4, 2018 · 40 comments · Fixed by brave/brave-core#21874

Comments

@bsclifton
Copy link
Member

Carried over from brave/browser-laptop#3007

If you have the necessary time, can you add autoscroll functionality for Brave on Linux? Normally, the scroll wheel is used on Linux to paste text that has previously been selected, as an alternative to Ctrl+C - Ctrl+V.
Firefox has this already built it ("Use autoscrolling" in preferences). On Chrome, this is not available.

I found this extension that works on Chrome: https://chrome.google.com/webstore/detail/autoscroll/occjjkgifpmdgodlplnacmkejpdionan

Also, their GitHub page with the source code: https://github.com/Pauan/AutoScroll

  • Platform (Win7, 8, 10? macOS? Linux distro?): Ubuntu 16.04 LTS
  • Brave Version: 0.11.3

@JaneSmith mentions that the extension linked to has a bad implementation. The functionality desired is what is present in Firefox

@bsclifton bsclifton added this to the 2.x Backlog milestone Sep 4, 2018
@bbondy bbondy modified the milestones: 2.x Backlog, 1.x Backlog Sep 30, 2018
@rebron rebron modified the milestone: 1.x Backlog Feb 7, 2019
@KiaraGrouwstra
Copy link

KiaraGrouwstra commented Mar 27, 2019

I tried the above AutoScroll extension, where in the reviews a comment led me to this thread. With the libnput commands there I got this to work in Brave as well. For a few web applications like GDocs I needed a browser restart.

Cases where this does not work yet for me:

  • PDFs
  • local files
  • in e.g. github source views longer than the page window (example page), autoscroll only works if I middle-click (whether single or held) outside of the code pane

@melroy89
Copy link

Please..

@clay53
Copy link

clay53 commented Feb 26, 2020

^

@srirambv
Copy link
Contributor

+1 from https://community.brave.com/t/how-do-i-enable-autoscroll-in-brave-for-linux-redux/162965

@srirambv srirambv added feature-request priority/P5 Not scheduled. Don't anticipate work on this any time soon. labels Sep 25, 2020
@kennell
Copy link

kennell commented Jan 11, 2021

FYI also still experiencing this on macOS

  • Brave Version 1.18.78 Chromium: 87.0.4280.141 (Official Build) (x86_64)
  • macOS Version 10.14.4 (Mojave)

@stdedos
Copy link

stdedos commented Feb 2, 2021

Can that ticket be used to ask for auto-scrolling in Android too?
Or should it be a new issue?

@rdong8
Copy link

rdong8 commented Mar 30, 2021

EDIT: for anyone wondering, use the Smoothscroll extension instead of the one mentioned above to increase the scroll speed on Linux. If you want to closely mirror Firefox's scrolling, try these settings: 100 400 999 20 10 50. Then, disable the autoscroll that the extension provides in the settings and follow the steps in this guide to enable native linux autoscroll. Note that you will have to redo this process every time you update your browser, so you might want to write a script to do it automatically.

@DontEatOreo
Copy link

I’m surprised this isn’t still a thing... Firefox had this feature for years for Linux and macOS.

Although the chromium extension does address the issue to some degree, it’s just not as good and smooth as having a native solution.

I hope you guys implement this; as far I know, no chromium fork has ever implemented auto-scroll on Linux and macOS.

@DontEatOreo
Copy link

I investigated this further and found this very interesting bug report for Chromium:
https://bugs.chromium.org/p/chromium/issues/detail?id=17689
It was created back in July of 2009, that's 12 years, and this feature is yet to be added to Chromium or any Chromium fork.

Everyone in that bug report as well on here wants Autoscroll to be a thing. If we look at "Comment 15," the user claims that he was able to implement Autoscroll for Linux by just changing two files, and he only changed around 35 lines of code.
If we take a look at "Comment 59," we will notice that someone named Evan from the Chromium dev team has made a patch that supposedly does what we want but causes issues on non-Linux versions. And if we look at the code, it's 28 lines of code. This just proves that implementing Autoscroll isn't something super hard. Maybe today implementing it will be harder, but is it really that hard? The person from "Comment 65" makes a really good point here it is:

"I don't get what the problem is. Every other browser on Linux has this functionality with no argument saying it's "not linux behavior" - which doesn't make sense to me. It seems like we were getting towards a solution here only to have it unceremoniously chopped. It's strange and inconsistent that the Linux side of the browser operates differently to the other platforms. I'm sure creating the browser in the first place was a whole lot harder then introducing a bloody autoscroll function. If it's hard to implement on the linux platform but apparently not on others then maybe the browser was designed wrong in the first place?"

The sad thing is that this affects every Chromium Fork and every Electron app. Further, the Chromium devs never gave a good reason as to why this can't be implemented. They already almost did it; it just needed a bit more work to make sure it works on macOS and doesn't mess with other OS's. Overall this whole situation is really weird. I can't believe I have to be here writing about this wherefrom the looks of this could've been done in a matter of hours or a few days way back then or now.

Chromium will most likely never make Autoscroll for Linux and macOS a reality. So I'm kindly asking the Brave team to look into this and be the first Chromium fork to have this feature.

@DontEatOreo
Copy link

DontEatOreo commented Nov 26, 2021

Another update. It appears that in order to enable Auto Scroll you only have to remove the if statement from this file here: https://github.com/chromium/chromium/blob/b441bdf0cbb94fb47df3a500346664f0f8bc4551/third_party/blink/renderer/core/exported/web_view_impl.cc#L1813

I'm surprised this is still an issue. From the looks of it. This whole thing can be resolve by just making a toggle setting in the settings page that sets "RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled" to true or false.

Hey, @bsclifton please take a look at this.

@rdong8
Copy link

rdong8 commented Dec 5, 2021

Seems like this file doesn't exist in Brave's repo?

@DontEatOreo
Copy link

DontEatOreo commented Dec 5, 2021

Seems like this file doesn't exist in Brave's repo?

True, but it might just be in a different location or a different file is handling this behavior on Brave. I'm only aware of this code's existence on the Chromium. When using Brave Browser on Windows, you can still use Middle Click to Auto Scroll.

@DontEatOreo
Copy link

I guess this is never going to get fixed.

@necrophcodr
Copy link

Brave Browser extends and patches but uses upstream Chromium. For changes, you should probably look into https://github.com/brave/brave-core

@necrophcodr
Copy link

Specifically a patch in https://github.com/brave/brave-core/tree/master/patches that modifies https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/core/exported/web_view_impl.cc#L1797-L1799 might do more of what you guys want. I don't have the skills to implement and test this, but it does seem possible to implement as a pull request.

@AdisonCavani
Copy link

Another update. It appears that in order to enable Auto Scroll you only have to remove the if statement from this file here: https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/core/exported/web_view_impl.cc#L1801

I'm surprised this is still an issue. From the looks of it. This whole thing can be resolve by just making a toggle setting in the settings page that sets "RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled" to true or false.

I removed the if statement and I can confirm that this solves this issue. I tested this on Arch Linux and autoscroll seems to work out of the box

@StegBrind
Copy link

Another update. It appears that in order to enable Auto Scroll you only have to remove the if statement from this file here: https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/core/exported/web_view_impl.cc#L1801
I'm surprised this is still an issue. From the looks of it. This whole thing can be resolve by just making a toggle setting in the settings page that sets "RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled" to true or false.

I removed the if statement and I can confirm that this solves this issue. I tested this on Arch Linux and autoscroll seems to work out of the box

After wasting several hours on figuring out how to build brave-browser from source and compiling it, I can also confirm that middle click autoscroll works fine on Arch Linux. I've been actively using browser with this feature enabled for 2 days already, and encountered no issues so far.

@rdong8
Copy link

rdong8 commented Feb 5, 2022

According to this post, brave is waiting for chromium to enable the feature so I guess it's gonna be a long time before we get it. Meanwhile, there's this extension which IMO is a lot better than Autoscroll one. I use 100 400 999 20 10 50 and it's pretty good.

@IzhakJakov
Copy link

Tested this wrapper with updating directly from Brave itself ("Help" -> "About Brave") and everything seem to work as usual so no additional steps are required 😄

Note: If you use brew/port to update, you'll probably need to redo some of the steps above. I have not tested this

@sangwoo108
Copy link

sangwoo108 commented Feb 2, 2024

Hello, everyone. I'm going to plumb the blink preference to the brave::/flags page so that the feature can be tested more easily. It seems to work well on Mac for me. If it turns out to work well on the both platforms, we could move it to brave://settings page later.

@sangwoo108 sangwoo108 self-assigned this Feb 2, 2024
@rebron rebron added priority/P4 Planned work. We expect to get to it "soon". OS/macOS OS/Desktop OS/Linux and removed priority/P5 Not scheduled. Don't anticipate work on this any time soon. suggestion labels Feb 6, 2024
@brave-builds brave-builds added this to the 1.64.x - Nightly milestone Feb 6, 2024
@LaurenWags
Copy link
Member

LaurenWags commented Mar 4, 2024

Verified with

Brave | 1.64.90 Chromium: 122.0.6261.94 (Official Build) beta (x86_64)
-- | --
Revision | 726c6970a1e9c057c69d80e03ad95a7c561fbfe7
OS | macOS Version 13.6.4 (Build 22G513)

Verified test plan from brave/brave-core#21874 (comment).

Enabled the flag and relaunched:

Screenshot 2024-03-04 at 3 00 59 PM

Confirmed after clicking the mouse middle button the cursor changed to an arrow and I could scroll up/down by moving the mouse.

1.64.mov

@LaurenWags LaurenWags added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-macOS labels Mar 4, 2024
@LaurenWags
Copy link
Member

LaurenWags commented Mar 4, 2024

Verified with

Brave | 1.64.94 Chromium: 122.0.6261.94 (Official Build) beta (arm64)
-- | --
Revision | 866e3a4bd76c9cc1762928df0cf9a53b8685ab71
OS | macOS Version 14.4 (Build 23E5191e)

Verified test plan from brave/brave-core#21874 (comment).

Enabled the flag and relaunched:

1

Confirmed after clicking the mouse middle button the cursor changed to an arrow and I could scroll up/down by moving the mouse:

arm64.mov

@LaurenWags LaurenWags added QA Pass-macOS-arm64 and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Mar 4, 2024
@MadhaviSeelam MadhaviSeelam added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Mar 15, 2024
@MadhaviSeelam
Copy link

MadhaviSeelam commented Mar 15, 2024

Verification PASSEDusing

Brave	1.64.104 Chromium: 123.0.6312.46 (Official Build) (64-bit) 
Revision	0ca3d372cf8aab96fafdd75f5c5c8d2012bc0cc6
OS	Linux

Verified test plan from brave/brave-core#21874 (comment).

image

Confirmed after clicking the mouse middle button the cursor changed to an arrow and I could scroll up/down by moving the mouse:

2024-03-15_12h38_57.mp4

@MadhaviSeelam MadhaviSeelam added QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment