Skip to content

Commit 6ca1ba9

Browse files
authored
fix(screenshot): only keep scroll-driven timelines running when animations are disabled (#44061)
1 parent c9b4632 commit 6ca1ba9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/playwright-core/src/server/screenshotter.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function inPagePrepareForScreenshots(screenshotStyle: string, hideCaret: boolean
112112
for (const animation of root.getAnimations()) {
113113
if (!animation.effect || animation.playbackRate === 0 || infiniteAnimationsToResume.has(animation))
114114
continue;
115-
if (!(animation.timeline instanceof DocumentTimeline))
115+
if (typeof ScrollTimeline !== 'undefined' && animation.timeline instanceof ScrollTimeline)
116116
continue;
117117
const endTime = animation.effect.getComputedTiming().endTime;
118118
if (Number.isFinite(endTime)) {

0 commit comments

Comments
 (0)