I have scrollspy in one of my pages. The scroll element is body.
It works all fine on the first load, but if you reload the page in the middle (scroll and then reload), all scrollspy stuff gets buggy !!
bootstrap 5 scrollspy problem
This is the pen i wrote
to recreate the situation i am suffering from:
- scroll to the middle of the page
- in the console of codepen run this
window.location.reload()
after this reload, scroll and checkout the scrollspy navbar :)