]> git.gir.st - VimFx.git/commit
Fix smooth scrolling speed in newer Firefox versions
authorSimon Lydell <simon.lydell@gmail.com>
Sun, 8 May 2016 07:34:48 +0000 (09:34 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Sun, 8 May 2016 07:35:41 +0000 (09:35 +0200)
commit8d838199c9bd423f666ac87d1a0bdc7282c61a25
treea5d42a8d777eddd66b48b900971b83196a8a7818
parent8887be9e914be166d3b7f7740a406d31257c5be0
Fix smooth scrolling speed in newer Firefox versions

The following pseudo-code used to work:

    setFirefoxSpringConstant()
    startScrollingSmoothly()
    resetFirefoxSpringConstant()
    // Some time later: Smooth scrolling finishes.

However, in some newer Firefox version that's changed.
`resetFirefoxSpringConstant` now has to be called when the smooth
scrolling is done, it seems. Unfortunately there appears to be no way of
knowing when that's the case. Instead, this commit introduces a timeout
before the spring constant pref is reset. The timeout can be customized
via the `scroll.reset_timeout` pref if needed. Special care was taken so
that, for example, holding `j` to scroll would only reset the pref
_once_ (after the last scroll command) and to the correct value.
documentation/options.md
extension/lib/commands.coffee
extension/lib/defaults.coffee
Imprint / Impressum