Open Bug 1825879 Opened 1 year ago Updated 1 year ago

More scrollend events than expected during click-and-hold on scrollbar track

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

People

(Reporter: botond, Unassigned)

Details

Attachments

(1 file)

Attached file Testcase

Steps to reproduce

  1. Load the attached testcase
  2. Click on an empty area of the scrollbar track and hold the mouse down until the scrollbar thumb stops moving
  3. Observe how the reported scrollend count changes

Note: on some platforms/configurations, the default behaviour is "scroll to click" (thumb jumps immediately to the cursor position), in such cases the bug can reproduced using Shift+click instead.

Expected results

Only one scrollend event is fired once the thumb reaches its final destination.

(Note, the final destination varies between platforms, it can be the cursor position or the end of the scrollbar track.)

Actual results

Two scrollend events are fired: one near the beginning of the animation (after the thumb has moved by one page or so), and one at the end.

Note that this gets worse with general.smoothScroll set to false. With general.smoothScroll=false I'll see more like 50 scrollend events. I don't know how clicking the scroll track scrolls to that location, but based on these results I'm guessing it is composed of several scrollTo or scrollBy calls. Perhaps we need some extra logic for the scrollbar track click case.

(In reply to Dan Robertson (:dlrobertson) from comment #1)

Note that this gets worse with general.smoothScroll set to false. With general.smoothScroll=false I'll see more like 50 scrollend events.

I think that case might be fine, as it's basically doing a bunch of instant scrolls with delays in between them. I think that's conceptually comparable to the case where you're ticking the mouse wheel with instant scrolling and the page scrolls in discrete increments with pauses between them.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: