improve iframe maxheight scrolling

This commit is contained in:
Philipp Kühn
2021-02-02 22:20:16 +01:00
committed by Hans Pagel
parent f27ead9b06
commit c3e1f4d6ee
6 changed files with 21 additions and 9 deletions

View File

@@ -31,9 +31,12 @@ export default {
},
mounted() {
this.resizeObserver = new window.ResizeObserver(() => {
this.resizeObserver = new window.ResizeObserver(items => {
if (window.parentIFrame) {
window.parentIFrame.sendMessage('resize')
window.parentIFrame.sendMessage({
type: 'resize',
height: items[0].contentRect.height,
})
}
})

View File

@@ -1,4 +1,3 @@
.demo-page {
// max-width: 40rem;
// margin: 2rem auto;
padding: 1.25rem;
}