vue2-scrollspy icon indicating copy to clipboard operation
vue2-scrollspy copied to clipboard

Menu and `v-scroll-spy` html element order.

Open exnihilo-creatio opened this issue 7 years ago • 3 comments

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.

exnihilo-creatio avatar Jan 31 '18 16:01 exnihilo-creatio

welcome pr.

ibufu avatar Feb 01 '18 02:02 ibufu

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?

gshishkov avatar May 18 '18 14:05 gshishkov

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>

gshishkov avatar May 22 '18 10:05 gshishkov