rigor789 / vue-scrollto

Adds a directive that listens for click events and scrolls to elements.
https://vue-scrollto.rigor789.com/
MIT License
2.07k stars 99 forks source link

Scroll when element behind fixed element #735

Open WithMistake opened 1 year ago

WithMistake commented 1 year ago

I have a problem with vue-scrollto. I have button and fixed element at the bottom of the page. I need scroll when button behind this fixed element, but libs think we see the button. How I can fix this? Or can we add offsetHeightContainer or something like this?

rigor789 commented 1 year ago

Can you share a simple example of the issue?

WithMistake commented 1 year ago

Red zone is fixed content. Button behind this content. Jumping is for onDone event. So, scroll doesn't work because thinking element in view.

https://user-images.githubusercontent.com/12686147/216056837-2df571d2-d0b4-43d3-9c8e-36535dd1a87a.mp4

WithMistake commented 1 year ago

Do you have any updates on this problem?

rigor789 commented 1 year ago

Is the source of your demo available? I think you can achieve what you are looking for with some offset values.

WithMistake commented 1 year ago

Create demo in sandbox. But this offset values doesn't have in vue-scrollto.

https://codesandbox.io/s/crazy-pike-hocs8p?file=/src/App.vue

WithMistake commented 1 year ago

Sorry for the insistence. Do you have any updates about this problem?