Open
Bug 1276361
Opened 8 years ago
Updated 2 months ago
Detect position change from requestAnimationFrame callback as scroll-linked effect
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
REOPENED
Tracking | Status | |
---|---|---|
firefox49 | --- | wontfix |
People
(Reporter: botond, Unassigned)
References
Details
(Whiteboard: [gfx-noted])
In bug 1229052, we implemented detection of "scroll-linked effects", that is, effects that update a positioning property of an element in response to a "scroll" event. In bug 1246290, we then leveraged this to optionally disable APZ for pages with scroll-linked effects.
Some pages have scroll-linked effects where a positioning property of an element is updated not in response to a "scroll" event, but in response to an input event, such as "mousewheel", that triggers a "scroll" event. From a user's point of view, these are still scroll-linked effects.
Reporter | ||
Comment 1•8 years ago
|
||
Kats, was it a conscious decision not to include events such as "mousewheel", or was this an oversight / something we just didn't get to yet?
Comment 2•8 years ago
|
||
It hadn't really occurred to me, honestly. Thinking about now I'm not sure how valuable it would be - in most cases when pages listen to the wheel events they are also doing preventDefault on them and reimplementing scrolling, so there shouldn't be any APZ lag in those cases. If there are sites that do element repositioning based on wheel events, does the APZ lag that results also manifest in other browsers?
Flags: needinfo?(bugmail.mozilla)
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Comment 3•8 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> It hadn't really occurred to me, honestly. Thinking about now I'm not sure
> how valuable it would be - in most cases when pages listen to the wheel
> events they are also doing preventDefault on them and reimplementing
> scrolling, so there shouldn't be any APZ lag in those cases. If there are
> sites that do element repositioning based on wheel events, does the APZ lag
> that results also manifest in other browsers?
Deeper investigation revealed that the site in question is not changin the position from a wheel event handler after all; it's doing so from a requestAnimationFrame callback.
Kats suggested on IRC detecting a scroll-linked effect if a position is changed from a requestAnimationCallback. I'm going to re-purpose this bug for that.
Summary: Scroll-linked effect not detected for events that are not "scroll" but can cause scrolling (such as "mousewheel") → Detect position change from requestAnimationFrame callback as scroll-linked effect
Comment 4•8 years ago
|
||
Considering the scroll-linked effect stuff is disabled by default I'm going to wontfix this for now. We can come back to if it things change.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Comment 5•3 years ago
|
||
We could detect scroll linked position changes in rAF callbacks if the rAF are registered inside scroll events such as;
element.addEventListener("scroll", () => {
requestAnimationFrame(() => {
anotherElement.style.top = element.scrollTop;
});
});
This is exactly the case of bug 1738838.
Reopening.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•