-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smooth scroll behavior broken with Chrome v102+ #138
Comments
Any information or workarounds on this yet? |
Same issue |
Same issue here, problem seen in recent version of Chrome and Safari Problem seems to be in the update-geometry.js
|
We've had this issue with chrome 102 as well.
|
Getting the same issue when using |
Commented these two lines but getting the exact same issue. |
Same issue |
Any update on this? |
1 similar comment
Any update on this? |
Pump!! |
I have the same issue using Chrome 115 |
Any updates? Still broken. |
I had the same issue. As a workaround I've used some js to make that smooth transition: scrollBy (offsetX, offsetY, duration = 0) {
const startTime = performance.now()
const startX = this.$el.scrollLeft
const startY = this.$el.scrollTop
if (duration === 0) {
// Immediate jump to the new position
this.$el.scrollLeft = startX + offsetX
this.$el.scrollTop = startY + offsetY
this.ps.update()
return
}
const animateScroll = () => {
const elapsedTime = performance.now() - startTime
const fraction = Math.min(elapsedTime / duration, 1)
const easeOutQuad = t => t * (2 - t)
const fractionEased = easeOutQuad(fraction)
const newScrollX = startX + fractionEased * offsetX
const newScrollY = startY + fractionEased * offsetY
this.$el.scrollLeft = newScrollX
this.$el.scrollTop = newScrollY
this.ps.update()
if (fraction < 1) {
requestAnimationFrame(animateScroll)
} else {
// Ensure final scroll position is set correctly
this.$el.scrollLeft = startX + offsetX
this.$el.scrollTop = startY + offsetY
this.ps.update()
}
}
requestAnimationFrame(animateScroll)
}, where ps is: this.ps = new PerfectScrollbar(this.$el, this.$props.options) Hope this helps 🚀 |
Perfect scrollbar isn't perfect as it turned out 😂 |
The perfect scrollbar element does not scroll to the expected offset with the 'smooth' behavior with the latest version of Chrome (v102). There is only a 1px change. It was working with previous versions.
See this jsfiddle: https://jsfiddle.net/5svurjg9/15/
The text was updated successfully, but these errors were encountered: