搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How do I set the scrolling distance to exactly 1 line of text?

more options

I thought Firefox used to have an option available to scroll by X lines of text. Now it seems to be scrolling by a slight bit more than 3 lines, resulting in misalignment of text with the top of the window when either the scrollbar or down arrow key is used. Where are the controls for making scroll height more predictable, and how do I use them? I am running Firefox 22.0 on Windows 7.

I thought Firefox used to have an option available to scroll by X lines of text. Now it seems to be scrolling by a slight bit more than 3 lines, resulting in misalignment of text with the top of the window when either the scrollbar or down arrow key is used. Where are the controls for making scroll height more predictable, and how do I use them? I am running Firefox 22.0 on Windows 7.

所有回覆 (4)

more options

Hi Brian, there is a setting for the number of lines:

toolkit.scrollbox.verticalScrollDistance (default value = 3)

This governs the up and down arrow keys, but doesn't seem to affect the up and down buttons on the scrollbar.

A "line" can vary greatly in height and I'm not sure how Firefox determines the actual distance to scroll. More research is needed on that. (Note that you cannot adjust the preference to a fraction; it must be a whole number.)

Have you noticed a differences from Firefox 21? That could be related to your Windows DPI settings, which Firefox now honors. Do you know what percentage you're using at the system level (e.g., 100%, 125%, 150%) and have you adjusted that in Firefox (using the layout.css.devPixelsPerPx preference)?

more options

You can modify mousewheel.*.delta_multiplier_y pref (vertical Y-axis) to change the vertical scroll amount.

  • mousewheel.system_scroll_override_on_root_content.enabled -> true
  • mousewheel.with_control.delta_multiplier_y

The delta_multiplier prefs are internally floats of type double and are converted to an integer for storing in a pref by multiplying them with 100 and are acting as percentages of the default scroll amount (i.e. 100 -> 1).
Set the mousewheel.default.delta_multiplier_y pref to 33 to change the scroll behavior from 3 lines to 1.

See also "Override system of system scroll speed":

more options

Hey, guys. Sorry I took so long to get back to you. Actually I noticed this happening as far back as version 13. I haven't tried any of your solutions yet, but I'm unsure whether they'll work, because I think the error is not in the setting itself but in the algorithm used to calculate the height of a line.

Edit: Interesting. Whenever there is a disparity between font sizes, the larger fonts appear to be included in the calculation somehow.

由 Brian23Fink 於 修改

more options

You don't need to change any Firefox settings to fix this issue

  1. Go to Control Panel
  2. Open the Mouse icon
  3. Go to the Wheel tab
  4. Change the Number Of Line to 1
  5. Click Ok to save the settings

NOTE: These instructions are for a Windows XP computer because I do not own a Windows 7 computer, but the steps should be relatively the same on both operating systems.

WARNING: Doing the above steps will change the number of lines to scroll on the entire Windows program, NOT just the Firefox program.