mdbootstrap / perfect-scrollbar

Minimalistic but perfect custom scrollbar plugin. Get more free components with Material Design for Bootstrap UI Kit (link below)
https://perfectscrollbar.com/
MIT License
352 stars 69 forks source link

element.scrollIntoView({ behavior: 'smooth' }) does not work in perfect scrollbar #44

Open EWhite613 opened 4 years ago

EWhite613 commented 4 years ago

If you use just element.scrollIntoView() it will work. But you can't make it smooth using element.scrollIntoView({ behavior: 'smooth' }

perfect-scrollbar JSFiddle

This issue was noticed in https://github.com/mdbootstrap/perfect-scrollbar/issues/717#issuecomment-344232767 but was never handled

jsmolina commented 2 years ago

looks like it's caused by not being shown: a .trigger("mouseover") before scrollIntoView worked for me