Commit 721d653e authored by Alain St-Denis's avatar Alain St-Denis
Browse files

observe the whole content when show_preview is set

parent d02bc7bd
Pipeline #6374 passed with stages
in 13 minutes and 51 seconds
......@@ -91,15 +91,15 @@ const StreamElement = {
},
methods: {
layoutAfterIframeResize() {
if (this.content.show_preview) {
const post = document.getElementById(this.content.id)
if (post) {
const iframe = post.getElementsByTagName("iframe")[0]
if (iframe) {
const c = this
const resizeObs = new MutationObserver(() => {
c.onImageLoad()
})
resizeObs.observe(iframe, {attributeFilter: ["height", "style"]})
// eslint-disable-next-line object-curly-newline
resizeObs.observe(post, {subtree: true, childList: true})
}
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment