diff --git a/js/h5p.js b/js/h5p.js index e5a4262..92283f3 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -263,6 +263,11 @@ H5P.init = function (target) { var parentHeight = iframe.parentElement.style.height; iframe.parentElement.style.height = iframe.parentElement.clientHeight + 'px'; + // Note: Force layout reflow + // This fixes a flickering bug for embedded content on iPads + // @see https://github.com/h5p/h5p-moodle-plugin/issues/237 + iframe.getBoundingClientRect(); + // Reset iframe height, in case content has shrinked. iframe.style.height = '1px';