Closed broadwell closed 4 years ago
Okay, yes, I can reproduce the "buggy" behaviour here (but only with a touch pad -- it seems I can't mouse-wheel fast enough, despite trying with two hands!), and confirm that these commits eliminate it, thanks. I don't love the implementation (any more than you seem to :) ), but it does the job robustly, and I'm happy to approve.
This fixes #572 (the secondary "sticky" navbar slides in or out unwelcomely during manual or anchor-driven up-scrolls, respectively, on L0 pages) through the rather brutish expedient of setting a global variable when any in-page anchor link is clicked; the scroll handling code checks this variable before displaying the navbar (or not). This replaces the heuristic of only hiding the navbar on upward scrolls of >100 pixels, which had proved problematic.
This also suppresses unwanted appearances of the navbar on the catalog pages (
/movement/
and/catalog-of-shodan/
).Note that the previous code in
tabs.js
for detecting when an in-page anchor link is being clicked didn't work properly.