Skip to content

Commit

Permalink
fix: switch cloned iframes from inline to blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinBrett committed Dec 29, 2022
1 parent 84bbe78 commit 728755c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/clone-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ function cloneCSSStyle<T extends HTMLElement>(nativeNode: T, clonedNode: T) {
Math.floor(parseFloat(value.substring(0, value.length - 2))) - 0.1
value = `${reducedFont}px`
}
if (
isInstanceOfElement(nativeNode, HTMLIFrameElement) &&
name === 'display' &&
value === 'inline'
) {
value = 'block'
}
targetStyle.setProperty(
name,
value,
Expand Down

0 comments on commit 728755c

Please sign in to comment.