add immediate timeout for embed postMessage

main
Mike Fix 5 years ago
parent 87b67230e7
commit 875f1782d6

@ -78,14 +78,18 @@ class Embed extends React.Component {
ref = React.createRef()
postMessage = () => {
getParent(window).postMessage(
JSON.stringify({
// Used by embed provider
src: window.location.toString(),
context: 'iframe.resize',
height: this.ref.current.offsetHeight
}),
'*'
setTimeout(
() =>
getParent(window).postMessage(
JSON.stringify({
// Used by embed provider
src: window.location.toString(),
context: 'iframe.resize',
height: this.ref.current.offsetHeight
}),
'*'
),
0
)
}

Loading…
Cancel
Save