Skip to content

Commit

Permalink
fix: dimensions not being applied (#117)
Browse files Browse the repository at this point in the history
Dimensions are not being properly applied when you seek to a position in
the replay. Need to use `setProperty`, otherwise the style attributes
get lost.
  • Loading branch information
billyvg committed Apr 26, 2024
1 parent b2ee6ab commit 3c473eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rrweb-snapshot/src/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ function buildNode(
}

if (name === 'rr_width') {
(node as HTMLElement).style.width = value.toString();
(node as HTMLElement).style.setProperty('width', value.toString());
} else if (name === 'rr_height') {
(node as HTMLElement).style.height = value.toString();
(node as HTMLElement).style.setProperty('height', value.toString());
} else if (
name === 'rr_mediaCurrentTime' &&
typeof value === 'number'
Expand Down

0 comments on commit 3c473eb

Please sign in to comment.