saka-key
saka-key copied to clipboard
Using "Scroll half page up" makes scrolling stuck on some pages
Steps to reproduce:
- Visit a page where the bug happens (I've seen it on a few, right now can only remember github issues pages)
- Scroll down a little
- Scroll back up using "Scroll half page down"
- Now try to scroll back down using the normal "scroll down" key
The page scrolls down but automatically scrolls up again, as if I were still pressing the "u" key (in the case of the vimium profile)
Only seems to affect Firefox.
This one must be annoying. My suspicion is that it's caused by the interplay of the following:
- Firefox fails to register keyup events reliably
- The smooth scroll polyfill I currently use for scrolling other than simple up or down.
- Wrong values being used in the requestAnimationFrame callback.
I'll take a look.
A good place to start is here https://github.com/lusakasa/saka-key/tree/master/src/modes/command/client/commands/scroll
I'm also seeing this on Firefox 56 on Linux using Saka Keys 1.21.2beta
Reproducible example (on my laptop at least...), using Vimium key bindings
- Open https://askubuntu.com/questions/103043/how-to-create-swap-partition-on-already-installed-ubuntu
- Press
d
to scroll down - Press
k
to scroll up a few times. Page is stuck at the position after the first scroll down
When I disable the Smooth Scroll option in Saka Keys this doesn't occur.
I can also reproduce this in Nightly (57.0a1, 2017-09-11) with vimium keybindings, and on multiple pages (including almost all of StackExchange, and GitHub issues pages).
Sequences that result in a stuck page:
- half page down (
d
), then scroll up (k
) - scroll down (
j
), half page up (u
), then scroll down (j
) - scroll down (
j
), scroll to top (gg
), then scroll down again (j
)
Interestingly, scroll to bottom (G
), then scroll up (k
) does not produce the bug, while scroll down (j
), scroll to bottom (G
), then scroll up (k
).
Disabling smooth scroll also makes the problem disappear.
I'll get around to fixing this sooner or later. The symptoms you've described occur because the logic for regular scroll up/down uses my own custom stateful implementation, while all the other scroll commands use the smooth scroll polyfill. The long term plan is to transition all scrolling to a custom implementation.
I'm still having this issue (Firefox 59.0 64-bit for Arch Linux), on the GitHub homepage for example, after scrolling down -> scrolling back up using the half page scroll. Smooth scroll enabled. Any news?
This is still a bug in Firefox Quantum 62.0.3 64-bit for Arch Linux.
Still happens in Firefox 67. I bump into this bug every now and then. Usually I press arrow_up or arrow_down to un-stuck it. But this is pretty annoying and it's been a while... so I'll have saka key smooth scrolling disabled until this is fixed.
Usually I press arrow_up or arrow_down to un-stuck it.
For unstuck we can use a space. :D It's easier to press than the arrow keys.
Still happens in Firefox 72 (developer edition).
@eejdoowad Maybe you could use Scroll. @AdamWagner and I have unified the scrolling mechanisms. It is based on your own work, so I guess the integration will be smooth.
Sometimes scroll just locks in a middle of a page, (I'm not using gg/G
, only j/k [+ shift]
. I'm using firefox 72.