vue2-scrollspy
vue2-scrollspy copied to clipboard
Menu and `v-scroll-spy` html element order.
It should be noted in the README.md that the menu html element should come before the v-scroll-spy
otherwise you'll get error messages. This breaks when updating from a version before the introduction of v-scroll-{spy, active, link}
.
Maybe make the v-scroll-spy not dependent on the order.
welcome pr.
I faced same problem. I have menu items that have to appear over the scrolled content. I don't want to use z-indexing and can't use position: absolute So I decided to use bootstrap classes "d-flex flex-column-reverse
" I and then to swap the menu and the content that bring error "Error in directive scroll-spy inserted hook: "TypeError: Cannot read property '0' of undefined
". Is there any solution for that?
I manage to avoid this bug by adding one empty div before the section and navigation part like this:
<div v-scroll-spy-active></div>