I've been looking for a better touchpad scrolling experience on Firefox for a while now and recently found a really nice fix! By default Firefox reads the touchpad like a scroll wheel using xinput, then the gecko rendering engine also has some baked in smooth scrolling features to give a partial momentum scrolling feel. Personally I've always found this scrolling method to have a decent amount of lag and make Firefox feel a bit chunkier than chromium based browsers.
Recently I found that if you set MOZ_USE_XINPUT2=1
as an environment variable, Firefox can read xinput2 touchpad scroll events which allows Firefox to use the same momentum scrolling system that the Gnome apps use! There are a few different ways to set this environment variable but I did it by creating a /etc/profile.d/
script.
Here's a quick guide if you'd like to try it out.
sudo mkdir /etc/profile.d/
(If you don't already have it.)
echo export MOZ_USE_XINPUT2=1 | sudo tee /etc/profile.d/use-xinput2.sh
And finally logout/back in! Hope this helps anyone looking for a more Gnome like scrolling feel in Firefox.