Viewport / Scrollbar Mouse Wheel Listener Issue


#1

I have a viewport with a vertical scrollbar. I added a listener to the scrollbar so that I could sync another viewport. The scrollbar calls scrollBarMoved as expected when the view is scrolled by dragging with the mouse or when the mouse wheel is used when hovering over the scrollbar. When the mouse wheel is used over the content area the scrollbar’s ‘thumb’ position is updated but scrollBarMoved is not called.
I know I can implement this feature using another approach, but it does seem inconsistent.
Update: Removing calls to cancelPendingUpdate() in Viewport::updateVisibleArea() for hbar and vbar fixes this problem, but I assume it is there for a reason.

hbar.cancelPendingUpdate(); // line 390
vbar.cancelPendingUpdate(); // line 399