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() ref = React.createRef()
postMessage = () => { postMessage = () => {
getParent(window).postMessage( setTimeout(
JSON.stringify({ () =>
// Used by embed provider getParent(window).postMessage(
src: window.location.toString(), JSON.stringify({
context: 'iframe.resize', // Used by embed provider
height: this.ref.current.offsetHeight src: window.location.toString(),
}), context: 'iframe.resize',
'*' height: this.ref.current.offsetHeight
}),
'*'
),
0
) )
} }

Loading…
Cancel
Save