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 Oct 20, 2023
1 parent 59df967 commit 092a1af
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 @@ -300,9 +300,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 092a1af

Please sign in to comment.