rvanhorn / hugo-dynamic-tabs

A Hugo theme component that allows you to add dynamic tabs in your markdown files.
https://hugo-dynamic-tabs.netlify.app/
MIT License
53 stars 14 forks source link

prevent scrolling to top #5

Closed phelipe closed 3 years ago

phelipe commented 3 years ago

Sometimes when click to change tab it scroll page to top. I think this change prevent scrolling to top,

rvanhorn commented 3 years ago

Hello,

Thanks for the PR!

I'm unable to replicate the issue, can you link me to an example please.

https://user-images.githubusercontent.com/41927843/103468310-9c2be200-4d0c-11eb-8639-d19296c2d2ef.mp4

phelipe commented 3 years ago

Sure! This is a gif about the problem: href

Using data-target there is no problem data

rvanhorn commented 3 years ago

How interesting, it looks like the tab isn't changing at all.

I'd really like to look at the code itself if its publicly available.

phelipe commented 3 years ago

I created a MWE to show the problem. Code bellow starter.zip

rvanhorn commented 3 years ago

Sorry for the delay.

Looks like is an issue with the version of jQuery you are using as I was able to "fix" it by either using the version recommend for Bootstrap 4.3.1 or by using Bootstrap 4.5.3 and its recommend version for jQuery. Seems there is some compatibility issues when using Bootstrap 4.3.1 and jQuery 3.4.1