Use native scrolling in vertical arrowscrollboxes
Categories
(Toolkit :: UI Widgets, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(1 external file)
arrowscrollbox already delegates the actual scrolling to the platform (scrollBy, scrollIntoView, scroll-behavior), but it calls preventDefault() on every wheel and touchmove event and drives the scroll offset from script. So the tab strip and menus get neither APZ momentum nor the OS wheel settings, and there are two sources of truth for the scroll offset.
Hand vertical mode over to the browser: give the inner <scrollbox> a real overflow while it is [overflowing] so it becomes a scroll container, and stop consuming wheel and touch events there.
Note that a wheel notch then scrolls the OS line count times the font line height rather than a whole tab row, and the platform caps a single wheel event at one page.
Horizontal mode is not covered here, since it needs platform work first: the per-element mousewheel autodir opt-in from bug 1749825 only takes effect on the APZ path, and APZ does not autodir pan gestures at all.
This is the vertical half of bug 1970536.
| Assignee | ||
Comment 1•4 months ago
|
||
The widget already delegates the actual scrolling to the platform (scrollBy,
scrollIntoView, scroll-behavior), but it intercepts every wheel and touchmove
event and drives the offset from script, so the tab strip and menus get neither
APZ momentum nor the OS wheel settings.
Vertical mode is the part we can hand over today: give the scrollbox a real
overflow so it becomes a scroll container, and stop consuming input there.
Horizontal mode still needs platform work -- the mousewheel autodir opt-in only
takes effect on the APZ path, and APZ doesn't autodir pan gestures at all -- so
it keeps scrolling from script.
Worth checking:
-
The scrollbox only becomes a scroll container while [overflowing]. That keeps
the widget's "don't consume the event if we can't scroll" semantics, and keeps
every menu that fits on screen from getting an APZ scroll frame. -
overscroll-behavior stops a menu or the tab strip from chaining its overscroll
to an ancestor. -
A wheel notch now scrolls the OS line count times the font line height, not a
whole tab row, and the platform caps one event at one page. That is the point
of the bug, but it does make wheel scrolling finer; the two tests that asserted
the old script-computed distances are updated accordingly. Item-boundary
alignment survives on the paths that are still script-driven: the scroll arrows
and keyboard paging. -
switchByScrolling relied on the widget consuming the wheel event. Preventing
the legacy scroll event's default action propagates back to the wheel event it
came from, which is what keeps the tabs from scrolling as well as switching.
Updated•4 months ago
|
Comment 3•3 months ago
|
||
| bugherder | ||
Updated•3 months ago
|
Description
•