From 6c5edee2194eed2e1a3d7f713106f2944bccc03f Mon Sep 17 00:00:00 2001
From: stvn <stvn@mit.edu>
Date: Wed, 29 Apr 2020 11:04:12 -0700
Subject: [PATCH] Stop skipping chromeless iframe resize onload event

in the case where the MutationObserver has already tried resizing the
iframe prior to it fully loading.
---
 lms/templates/courseware/courseware-chromeless.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lms/templates/courseware/courseware-chromeless.html b/lms/templates/courseware/courseware-chromeless.html
index db15dbc08b9..33d9c2b3ada 100644
--- a/lms/templates/courseware/courseware-chromeless.html
+++ b/lms/templates/courseware/courseware-chromeless.html
@@ -137,7 +137,7 @@ ${HTML(fragment.foot_html())}
         var newHeight = contentElement.offsetHeight;
         var newWidth = contentElement.offsetWidth;
 
-        if (newWidth === lastWidth && newHeight === lastHeight) {
+        if (eventType !== 'load' && newWidth === lastWidth && newHeight === lastHeight) {
           console.log('MFE', 'Ignore resize', newWidth, newHeight, eventType);
           return;
         }
-- 
GitLab