Skip to content
Snippets Groups Projects

Resolve "Resize listener for IFrame in LegacyBaseTemplate does not trigger in some cases"

2 files
+ 5
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -77,13 +77,13 @@ export default {
const title = this.$refs.contentIFrame.contentWindow.document.title;
this.$root.$setPageTitle(title);
// Adapt height of IFrame according to the height of its contents once and listen to resize events
// Adapt height of IFrame according to the height of its contents once and observe height changes
this.iFrameHeight =
this.$refs.contentIFrame.contentDocument.body.scrollHeight;
this.$refs.contentIFrame.contentWindow.onresize = () => {
new ResizeObserver(() => {
this.iFrameHeight =
this.$refs.contentIFrame.contentDocument.body.scrollHeight;
};
}).observe(this.$refs.contentIFrame.contentDocument.body)
this.$root.contentLoading = false;
},
Loading