IntersectionObserver doesn't report transform animations' changes on the compositor
Categories
(Core :: DOM: Animation, defect)
Tracking
()
People
(Reporter: alexander, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Steps to reproduce:
Create IntersectionObserver
Observe element that has CSS transition or animation
Move this element to intersect with root as part of CSS animation or transition
Actual results:
IntersectionObserver callback triggering is throttled
Expected results:
Callbacks should work as configured.
Here's the reproduction link:
https://codepen.io/talmand/pen/oNvdQOR/
Strange thing is when you move mouse mouse around the document it starts to trigger properly. In Chrome is does not trigger at all unless you move mouse around, here's Chromium bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=1080583
However in Chrome it could be also remedied by empty requestAnimationFrame function trigger on each frame. It doesn't help in case of Firefox though. In Safari nothing seems to help...
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
I guess we could not throttle transform animation updates on the main thread if there's an IntersectionObserver observing that element or something... A bit annoying :)
Interesting that rAF in Chrome updates the throttled animation state. Maybe that explains some of the animation synchronization differences that we see with Chrome from time to time?
Comment 3•5 years ago
|
||
Yeah, Chrome's behavior is interesting. To fix this issue we need to observe transform animations on the compositor.
Comment 4•5 years ago
|
||
Because this bug's Severity is normal
and has not been changed, and this bug's priority is --
(none,) indicating it has has not been previously triaged, the bug's Severity is being updated to --
(default, untriaged.)
Comment 5•5 years ago
|
||
The severity field is not set for this bug.
:birtles, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Description
•