Igor Randjelovic
Igor Randjelovic
You can hook into the `onDone` callback and use vue to toggle a class on any element.
https://github.com/rigor789/vue-scrollto/blob/197b365e2914b0e47470d1d10ffc6bfc127a4151/src/utils.js#L13-L18 is what resolves the target - I guess passing an html element, or a ref would also work, but I have not tested this directly (across different browsers). I...
@mostafakazemi what's different when it comes to scrolling with RTL languages? The scrolling is done from current place to the target - no matter where it is on the page,...
@mostafakazemi Ok I see - but there is no `scrollRight`. The calculations look to be fine for rtl, except that we are scrolling to the right edge of the element....
The typings are for vue 2.x - you should probably exclude `node_modules` from type checking, or use `skipLibCheck` in your tsconfig. I'm not quite sure what the best practice is...
It would be helpful if you could debug the issue and let us know where it fails. Are there any errors?
Are you scrolling a different container? Can you share a reproduction (jsfiddle, codesandbox, etc.) that shows this behavior?
Yes, change the `container` to the scrolling container: https://github.com/rigor789/vue-scrollto#container
If you can provide a sample (jsfiddle/codesandbox etc), I can take a look - but you are most likely not setting the right `container`.
Here is an easier workaround: https://github.com/rigor789/vue-scrollto/issues/25#issuecomment-305910125 It is intended functionality, because in most cases we don't want a hash to change