diff --git a/js/h5p.js b/js/h5p.js index aee90e2..dd74a79 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -247,7 +247,7 @@ H5P.init = function (target) { if (H5P.externalEmbed === false) { // Internal embed // Make it possible to resize the iframe when the content changes size. This way we get no scrollbars. - var iframe = window.parent.document.getElementById('h5p-iframe-' + contentId); + var iframe = window.frameElement; var resizeIframe = function () { if (window.parent.H5P.isFullscreen) { return; // Skip if full screen.