saka-key icon indicating copy to clipboard operation
saka-key copied to clipboard

Using "Scroll half page up" makes scrolling stuck on some pages

Open lufte opened this issue 7 years ago • 12 comments

Steps to reproduce:

  1. Visit a page where the bug happens (I've seen it on a few, right now can only remember github issues pages)
  2. Scroll down a little
  3. Scroll back up using "Scroll half page down"
  4. 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) output

Only seems to affect Firefox.

lufte avatar Aug 24 '17 00:08 lufte

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

eejdoowad avatar Aug 24 '17 01:08 eejdoowad

I'm also seeing this on Firefox 56 on Linux using Saka Keys 1.21.2beta

teranex avatar Aug 31 '17 20:08 teranex

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.

teranex avatar Aug 31 '17 20:08 teranex

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.

gpelouze avatar Sep 13 '17 09:09 gpelouze

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.

eejdoowad avatar Sep 14 '17 03:09 eejdoowad

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?

dzjkb avatar Apr 29 '18 11:04 dzjkb

This is still a bug in Firefox Quantum 62.0.3 64-bit for Arch Linux.

v3ree avatar Oct 23 '18 18:10 v3ree

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.

ropery avatar Jun 18 '19 03:06 ropery

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.

UnkwUsr avatar Aug 12 '19 15:08 UnkwUsr

Still happens in Firefox 72 (developer edition).

Arthaey avatar Dec 31 '19 19:12 Arthaey

@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.

alexherbo2 avatar Dec 31 '19 20:12 alexherbo2

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.

ghost avatar Jan 07 '20 20:01 ghost