"Back to Top" Button flickers while scrolling toward the top of page #592
-
Cloud-init's docs recently switched to furo. I just noticed while testing some changes on mobile (Android) that my average read/scroll speed apparently works out to be such that the button flickers while I'm scrolling. Not a huge deal, but pretty annoying. I'm not sure if this is expected - on desktop Firefox this button only appears while scrolling upwards, which I'm not doing on mobile. I'm not sure whether this is a weird mobile interaction, a bug, or if Has anyone else noticed this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
What mobile browser are you using, what's the screen resolution and what's the device pixel ratio? I've seen this in the past with Safari on iOS, but not on Firefox for Android. I wouldn't be surprised if there's some weirdness around how the scroll position on the page is handled by mobile browsers; especially on hi-dpi screens. |
Beta Was this translation helpful? Give feedback.
-
Well, in case someone else can spot something off about the logic involved here: furo/src/furo/assets/scripts/furo.js Lines 19 to 30 in da0674a |
Beta Was this translation helpful? Give feedback.
-
Now that you mention it, I notice that text also shifts vertically by a pixel when this happens. This shift is much less noticeable than a button flashing in and out of existence, which I was much more focused on. |
Beta Was this translation helpful? Give feedback.
-
I'm able to reproduce this on my phone (3.000 DPR) if I scroll really slowly. |
Beta Was this translation helpful? Give feedback.
-
I wonder if this could be debounced by with something like: "track the last N positions, and don't add/remove unless these positions are all increasing/decreasing", using heuristics to find N. |
Beta Was this translation helpful? Give feedback.
-
Closing in favor of #681, which is the tracking issue for fixing this. :) |
Beta Was this translation helpful? Give feedback.
Closing in favor of #681, which is the tracking issue for fixing this. :)