From 2a30a73053915f7c8c5fc2e8da5138c60a38e4f9 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Thu, 1 May 2025 22:01:03 +0000 Subject: [PATCH] fix: unwanted section of code causing cross-origin error (#36643) https://github.com/openedx/edx-platform/pull/36477#discussion_r2069105832 (cherry picked from commit 65080107261cb285ea0cb1acf3dfa4221f78d721) --- common/templates/xblock_v2/xblock_iframe.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/templates/xblock_v2/xblock_iframe.html b/common/templates/xblock_v2/xblock_iframe.html index 39eb044b183e..ba4828df02ae 100644 --- a/common/templates/xblock_v2/xblock_iframe.html +++ b/common/templates/xblock_v2/xblock_iframe.html @@ -455,9 +455,6 @@ // it will report the height of its contents to the parent window when the // document loads, window resizes, or DOM mutates. if (window !== window.parent) { - var lastHeight = window.parent[0].offsetHeight; - var lastWidth = window.parent[0].offsetWidth; - function dispatchResizeMessage(event) { // Note: event is actually an Array of MutationRecord objects when fired from the MutationObserver var newHeight = rootNode.scrollHeight; @@ -472,10 +469,6 @@ } }, document.referrer ); - - lastHeight = newHeight; - lastWidth = newWidth; - // Within the authoring microfrontend the iframe resizes to match the // height of this document and it should never scroll. It does scroll // ocassionally when javascript is used to focus elements on the page