3 ms·
Unfortunately, that site does scrolljacking, and takes over all scroll actions rather than just vertical ones, completely ruining scrolling on what I think will
by chrismorgan 5y ago
Unfortunately, that site does scrolljacking, and takes over all scroll actions rather than just vertical ones, completely ruining scrolling on what I think will be basically all laptop touchpads these days (ancient laptops with coarse touchpad scrolling might be less badly affected).
Precise symptoms vary by browser; in Firefox you’re likely to just get jumped from one end to the other very quickly (because it lets the JavaScript take over, and the JavaScript ignores the scrolling delta and jumps by a fixed amount on each event), while in Chromium horizontal scrolling doesn’t get destroyed quite so much, it just becomes flickery, because Chromium lets the JavaScript change the scroll position (turning your 1px scroll into a big jump) and then changes it back, apparently. I haven’t investigated why.
I consistently say that scrolljacking is always bad, because it’s simply not possible to get it right (the web doesn’t expose the right primitives to make it work). This is one of the exceptionally few cases where carefully limited scrolljacking of vertical scrolling to horizontal might be warranted (though it’d still be severely imperfect because the web doesn’t have the right primitives to make it work properly), because of comparatively poor support for this text direction on some devices, but the implementation employed is awful, making it work tolerably for old coarse-scrolling mice while ruining it for newer hardware.
- quietbritishjim 5y agoWeird, horizontal scrolling works completely smoothly and as expected for me on Firefox on Windows. I tried: * Two-finger scroll on my touchpad, moving horizontally * Middle clicking with the mouse so the scrolly icon thing comes up (it shows as a left-right icon rather than the normal up-down one) and then gently moving the mouse left and right
- chrismorgan 5y agoI’m on Linux. This stuff is notoriously fiddly and inconsistent across platforms. I think the relevant code is https://president.mn/mng/wp-content/themes/president/frontend/js/mousewheel.js?ver=5.2.2; https://president.mn/mng/wp-content/themes/president/fronten... at a five-second glance, it’s not doing any sort of sniffing, so it’s most likely the events being passed around are simply different in some way. And that kinda demonstrates why it’s such a dangerous thing to fiddle with, and why scrolljacking is a bad idea. Looks like it might be trying to ignore horizontal scrolling. Dunno what’s happening with it.
- kiwijamo 5y agoFirefox/Linux here and it works fine for me? It scrolls horizontally which I assume is the expected behaviour.
- chrismorgan 5y agoI just pulled out an old laptop, still Arch Linux, but i3 (X) rather than Sway (Wayland), and only Firefox 65 just yet because I haven’t done the two years’ worth of updates since I last touched it (think I did two years’ worth of updates that time too!). It has a coarse-scrolling touchpad and uses the syntaptics driver. Vertical scrolling doesn’t scroll smoothly or by the right amounts, but generally works. Horizontal scrolling is more or less just completely broken except at high speeds: it scrolls rightwards for a bit, and then jumps to the left by a sizeable chunk, so if you’re scrolling too slowly you’ll end up behind where you even started. (Upgraded to 89, symptoms are the same, or possibly even worse on horizontal scrolling, but I can’t compare it any more because downgrading is more trouble than it’s worth. And also I broke something as part of the two-years-of-upgrades jump and it won’t boot for now. First time I’ve managed that: achievement unlocked! :-) )
- perryizgr8 5y agoVertical and horizontal scroll is working totally fine for me. Edge/Macos. I tried with the in-built touchpad and an external mouse with a scroll wheel.