Closed arp242 closed 1 year ago
In Firefox when zoomed to 120%, clicking on a menu item on /en/v1.0.0.html will highlight the entry above it, rather than the entry we clicked on.
the problem is that the scroll value may not be a full pixel anymore, for example after clicking "Integer":
console.log(target, target.offsetTop, window.scrollY) // <h2 id="string" data-target="nav.header"> 5828 9511.6669921875 // <h2 id="integer" data-target="nav.header"> 9512 9511.6669921875
Doing a Math.ceil() fixes it. Round is not enough as some values are below .5
Thank you!
In Firefox when zoomed to 120%, clicking on a menu item on /en/v1.0.0.html will highlight the entry above it, rather than the entry we clicked on.
the problem is that the scroll value may not be a full pixel anymore, for example after clicking "Integer":
Doing a Math.ceil() fixes it. Round is not enough as some values are below .5