diff --git a/src/course-unit/CourseUnit.test.jsx b/src/course-unit/CourseUnit.test.jsx
index bce5f5c1b6..02fd51d68e 100644
--- a/src/course-unit/CourseUnit.test.jsx
+++ b/src/course-unit/CourseUnit.test.jsx
@@ -453,26 +453,6 @@ describe('', () => {
window.open = open;
});
- it('updates iframe height when dropdown menu is toggled', async () => {
- const { getByTitle } = render();
-
- const ACTION_DROPDOWN_HEIGHT = 300;
-
- await waitFor(() => {
- const iframe = getByTitle(xblockContainerIframeMessages.xblockIframeTitle.defaultMessage);
- expect(iframe.getAttribute('style')).toContain('height: 0px;');
- });
-
- simulatePostMessageEvent(messageTypes.toggleDropdownMenu, {
- subMenuHeight: ACTION_DROPDOWN_HEIGHT,
- });
-
- await waitFor(() => {
- const iframe = getByTitle(xblockContainerIframeMessages.xblockIframeTitle.defaultMessage);
- expect(iframe.getAttribute('style')).toContain(`height: ${ACTION_DROPDOWN_HEIGHT}px;`);
- });
- });
-
it('checks courseUnit title changing when edit query is successfully', async () => {
const {
findByText,
diff --git a/src/course-unit/constants.js b/src/course-unit/constants.js
index c5b0c820ea..f95e438d0a 100644
--- a/src/course-unit/constants.js
+++ b/src/course-unit/constants.js
@@ -58,5 +58,4 @@ export const messageTypes = {
duplicateXBlock: 'duplicateXBlock',
refreshPositions: 'refreshPositions',
newXBlockEditor: 'newXBlockEditor',
- toggleDropdownMenu: 'toggleDropdownMenu',
};
diff --git a/src/course-unit/xblock-container-iframe/index.tsx b/src/course-unit/xblock-container-iframe/index.tsx
index 58e23aa84d..706111f857 100644
--- a/src/course-unit/xblock-container-iframe/index.tsx
+++ b/src/course-unit/xblock-container-iframe/index.tsx
@@ -71,7 +71,6 @@ const XBlockContainerIframe: FC = ({
const [deleteXblockId, setDeleteXblockId] = useState(null);
const [isDeleteModalOpen, openDeleteModal, closeDeleteModal] = useToggle(false);
const [isConfigureModalOpen, openConfigureModal, closeConfigureModal] = useToggle(false);
- const [dropdownHeight, setDropdownHeight] = useState(0);
const { setIframeRef, sendMessageToIframe } = useIframe();
const [editXblockId, setEditXblockId] = useState(null);
const [currentXblockData, setCurrentXblockData] = useState({});
@@ -140,7 +139,6 @@ const XBlockContainerIframe: FC = ({
[messageTypes.duplicateXBlock]: (payload) => handleDuplicateXBlock(payload.id),
[messageTypes.refreshPositions]: handleRefreshXBlocks,
[messageTypes.newXBlockEditor]: (payload) => navigateToNewXBlockEditor(payload.url),
- [messageTypes.toggleDropdownMenu]: ({ subMenuHeight }) => setDropdownHeight(subMenuHeight),
};
const handleMessage = (event: MessageEvent) => {
@@ -212,7 +210,7 @@ const XBlockContainerIframe: FC = ({
loading="lazy"
style={{
width: '100%',
- height: iframeHeight + dropdownHeight,
+ height: iframeHeight,
}}
scrolling="no"
referrerPolicy="origin"