Mouse Scrolling

Firefox Scroll Tweak

A Firefox tweak everyone will appreciate…

One of things i dislike about Firefox is how the document scrolling preferences are set by default. These options, of which only one is available from the preferences UI, affect how scrolling with the mouse wheel or keyboard works and, in my opinion, it works lousy with the default settings. Thankfully, page scrolling can be easily and greatly improved so that it becomes silky smooth and responds dynamically to the speed at which you rotate your scroll wheel. This tweak will also enable smooth scrolling when a page is scrolled with the up/down arrow keys or the page up/down keys. After following this guide, you should be able to read text even while it is being slowly scrolled. Although this tweak is hugely beneficial either way, you will get the most out of it if hardware acceleration is enabled in the Firefox options.

There are at least a few extensions that are built to customize scroll operations and of them i have used both Yet Another Smooth Scrolling and SmoothWheel. Both are similar and both work well, however i finally decided to dig into the Firefox preferences and discover if i could customize the scrolling behavior without installing an extension. It so happens that this is very easy to do, though it may take some fiddling to get the scrolling behavior set up exactly as you want it.

You should store these preferences in a user.js file.

Following are the preferences i toyed with and a description of what they affect. The suggested values seem to offer a good starting point. Note that “ms” stands for milliseconds (there are 1000 milliseconds in a second).

preference name type default value suggested value description
general.smoothScroll boolean true true enable/disable smooth scrolling – this is the only option available in the Firefox Preferences UI
general.smoothScroll.lines boolean true true enable/disable smooth line scrolling (up/down arrow/page keys)
general.smoothScroll.lines.durationMaxMS integer 150 400 maximum time in ms for which to smooth out the start/end of line scrolling operations with the up/down arrow or up/down page keys
general.smoothScroll.lines.durationMinMS integer 150 200 minimum time in ms for which to smooth out the start/end of line scrolling operations with the up/down arrow or up/down page keys
general.smoothScroll.mouseWheel boolean true true enables smooth scrolling with the mouse wheel
general.smoothScroll.mouseWheel.durationMaxMS integer 400 600 smooths the beginning and end of scrolling operations (value is milliseconds)
general.smoothScroll.mouseWheel.durationMinMS integer 200 400 smooths the beginning and end of scrolling operations (value is milliseconds)
mousewheel.acceleration.factor integer 10 10 sets the wheel acceleration factor if mousewheel.acceleration.start > -1
mousewheel.acceleration.start integer -1 0 when to apply mousewheel.acceleration.factor (after how many scroll clicks of the mouse wheel)
mousewheel.default.delta_multiplier_y integer 100 85 sets the vertical step size, or how far a page will scroll with one scroll click of the mouse wheel
general.smoothScroll.other boolean true true enable/disable other smooth scrolling (Home/End keys)
general.smoothScroll.other.durationMaxMS integer 150 400 smooth out the start/end of other scrolling operations in ms
general.smoothScroll.other.durationMinMS integer 150 200 smooth out the start/end of other scrolling operations in ms
general.smoothScroll.pages boolean true true enable/disable page smooth scrolling (PgUp/PgDn keys)
general.smoothScroll.pages.durationMaxMS integer 150 400 smooth out the start/end of page scrolling operations in ms (PgUp/PgDn keys)
general.smoothScroll.pages.durationMinMS integer 150 200 smooth out the start/end of page scrolling operations in ms (PgUp/PgDn keys)

 

You can copy the code below if you want to paste it directly into your user.js file:

// === SCROLLING ===============================================================
user_pref("general.smoothScroll", true); // boolean enable/disable smooth scrolling
user_pref("general.smoothScroll.lines", true); // boolean enable/disable smooth line scrolling (up/down arrow/page keys)
user_pref("general.smoothScroll.lines.durationMaxMS", 400); // boolean smooth out the start/end of line scrolling operations in ms (up/down arrow/page keys)
user_pref("general.smoothScroll.lines.durationMinMS", 200); // boolean smooth out the start/end of line scrolling operations in ms (up/down arrow/page keys)
user_pref("general.smoothScroll.mouseWheel", true); // boolean enable/disable smooth scrolling with mouse wheel
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 600); // integer smooth out the start/end of scrolling operations in ms
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 400); // integer smooth out the start/end of scrolling operations in ms
user_pref("mousewheel.acceleration.factor", 10); // integer sets acceleration factor if mousewheel.acceleration.start > -1
user_pref("mousewheel.acceleration.start", 0); // integer when to apply mousewheel.acceleration.factor (after how many scroll clicks of mouse wheel)
user_pref("mousewheel.default.delta_multiplier_y", 85); // integer sets the vertical step size
user_pref("mousewheel.min_line_scroll_amount", 1); // integer how many lines to scroll with mouse wheel (approx.)
user_pref("general.smoothScroll.other", true); // boolean enable/disable other smooth scrolling (Home/End keys)
user_pref("general.smoothScroll.other.durationMaxMS", 400); // integer smooth out the start/end of other scrolling operations in ms
user_pref("general.smoothScroll.other.durationMinMS", 200); // integer smooth out the start/end of other scrolling operations in ms
user_pref("general.smoothScroll.pages", true); // boolean enable/disable page smooth scrolling (PgUp/PgDn keys)
user_pref("general.smoothScroll.pages.durationMaxMS", 400); // integer smooth out the start/end of page scrolling operations in ms (PgUp/PgDn keys)
user_pref("general.smoothScroll.pages.durationMinMS", 200); // integer smooth out the start/end of page scrolling operations in ms (PgUp/PgDn keys)

3 thoughts on “Firefox Scroll Tweak

  1. thank you . i have tried most options i can think of. i made a second firefox profile and edited all the aboutconfigs. i have spent quite some time searching and not found anything or anyone which has a similar issue which is quite surprising. perhaps someone knows how to make an addon for firefox that could fix it.

    kind regards

  2. I was just wandering if perhaps you could help me with a scrolling issue i have with firefox. I use a synaptics touchpad and i scroll either with two fingers or with the synaptics 1 finger scroll.

    The issue i am facing is that even though i have deselected the firefox smooth scroll option it still scrolls smoothly. now you may ask why i dislike smooth scroll in firefox. the reason is that all the writing goes blurry in smooth scroll and gives me a headache. i have seen this on both my laptops.

    On my previous laptop when i scrolled the screen did not move undless i had scrolled 3cm in which instance the screen moved 3cm lower and so on. so for every 3 cm of scroll the screen jumped 3cm. This was very useful as it allowed my brain to very briefly take in information as it was not blurry (i could try and explain further if needed). the only difference is that i had an alps touchpad and not synaptics but my new laptop has synaptics. I think the reason is that synaptics scroll is basically a gesture and it acts not as a mousescroll but as if you are moving the scroll bar. (I think it actually makes a secret window that tells the current application to scroll. therefore in firefox even with smoothscroll disabled it stills scrolls smoothly just as if you would take the scroll bar and move it down consistently and slowly.

    I have tried lots of different settings in about:config on a test profile but it has not helped. i have even gone into the registry and added the dword UseScrollCursor but it has not helped.

    perhaps you have an idea of what i could do so that firefox screen only moves once scrolled a designated amount and keeps doing that.

    1. hi jason – nothing obvious comes to mind off-hand i’m afraid – the only 2 things i can think of are 1), see if there’s an option in your touch-pad driver (mouse settings) to see if it can be disabled there and 2), go back into about:config and set the filter to display ‘smoothScroll’ – there’s quite a few settings there that you can change – if you screw something up and want to revert it, just right-click the setting and click ‘reset’

      failing that, do a search for something like: “disable smooth scrolling” synaptic

Leave a Reply

Your email address will not be published. Required fields are marked *