ilyashubin/scrollbooster

Jumpy behavior when dragging with mouse after scrolling with touchpad

Closed this issue · 4 comments

I've a horizontal scroll view that can be scrolled my touch, touchpad or by dragging with scrollbooster.
When the scroll view is scrolled using the touchpad and afterwards dragged by scrollbooster, I get jumpy behavior :/

Currently I've worked around it by updating the scrollbooster offset in the shouldScroll method:

//Jumpy behavior workaround
shouldScroll: () => {
        sb.setPosition({x: scrollView.scrollLeft});
        return true
}

I have the same isse, where I should add that? scrollbooster.js? Can you give me more details...I tried at line 154 but I get an error:

Uncaught ReferenceError: scrollView is not defined
    at Object.shouldScroll (index.js:58)
    at HTMLDivElement.events.pointerdown (index.js:367)

thx

@byman64

mybe

sb.setPosition({x: viewport.scrollLeft});

Not sure I understand correctly. Is this issue still relevant on version 2.0?
Some online sandbox with example would be very useful

I think this may be due to an open devtools
I'm closing this for now, please let me know if this issue still remains