From 739c7fcd0df50ba9cae4c169b286982cb5fb437b Mon Sep 17 00:00:00 2001 From: John Pham Date: Fri, 17 Dec 2021 16:12:51 -0800 Subject: [PATCH] Pause animations on pseudo elements (#56) --- package.json | 2 +- src/replay/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b1922fe6..d0155eac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@highlight-run/rrweb", - "version": "1.0.7", + "version": "1.0.8", "description": "record and replay the web", "scripts": { "test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts", diff --git a/src/replay/index.ts b/src/replay/index.ts index 81b79c1d..316a52a9 100644 --- a/src/replay/index.ts +++ b/src/replay/index.ts @@ -828,7 +828,7 @@ export class Replayer { ).concat(this.config.insertStyleRules); if (this.config.pauseAnimation) { injectStylesRules.push( - 'html.rrweb-paused * { animation-play-state: paused !important; }', + 'html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }', ); } for (let idx = 0; idx < injectStylesRules.length; idx++) {