Closed Bug 1611060 Opened 6 years ago Closed 5 years ago

ScrollingEnd event not fired for scrollable areas other than the document itself

Categories

(Core :: Disability Access APIs, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: Jamie, Assigned: eeejay)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Reported to me by a ZoomText engineer.
When a document is scrolled in Firefox, we fire EVENT_SCROLLING_END. However, we don't fire any event when scrolling happens within a nested scrollable area.
Impact: This means that the ZoomText cursor enhancement stays in the wrong location when, for example, scrolling a message being composed in the Gmail message composer.

STR:

  1. Open this test case:
    data:text/html,<div style="height: 500px; overflow: scroll;"><p>foo</p><hr style="height: 2000px;"><p>bar</p>
  2. Monitor for EVENT_SCROLLING_END events.
  3. Scroll down from foo.
    • Expected: EVENT_SCROLLING_END should be fired.
    • Actual: It isn't.

Currently, we add a scroll position listener for the document only:
https://searchfox.org/mozilla-central/rev/e878e5b81bb319c141900ce9cfcde732df5c8449/accessible/base/NotificationController.cpp#643
https://searchfox.org/mozilla-central/rev/e878e5b81bb319c141900ce9cfcde732df5c8449/accessible/generic/DocAccessible-inl.h#87
To fix this, we'd need to add a scroll position listener for any Accessible which has a scrollable frame.
Furthermore, document scrolling events are deferred using a timer to avoid flooding. I guess we'd need to do the same for any other scrollable frame.

Eitan, any thoughts here?

Flags: needinfo?(eitan)

Yeah. It seems like scroll events should not be exclusive to documents. I'll take this.

Assignee: nobody → eitan
Flags: needinfo?(eitan)

Currently, only documents dispatch scroll events when in reality any
element can have scrollable overflows.

Pushed by eisaacson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e75ce1fef67 Dispatch a11y scroll events for all DOM scrolls. r=Jamie
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Blocks: 1616133
Regressions: 1616797
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: