perfect-scrollbar
perfect-scrollbar copied to clipboard
Element.scroll() doesn't work with smooth behavior in Firefox
- [x] Check FAQ and Caveats
- [x] Search if there's already one reported in Issues
- [x] Prepare a JSFiddle reproducing the issue
The scroll() method of elements doesn't work properly in Firefox when the smooth behavior is enabled.
It works fine in Chrome and Edge.
It seems like the scroll event is interrupted by some other listener as it still moves a bit. Both behaviors can be checked in the example Pen above.
I was able to trace it down to this line: https://github.com/mdbootstrap/perfect-scrollbar/blob/1.5.1/src/update-geometry.js#L86
When it's commented out everything works as expected, but I'm not sure why exactly the scrollLeft property affects smooth scrolling.
Maybe also related to #138 ?