diff --git a/src/course-unit/CourseUnit.test.jsx b/src/course-unit/CourseUnit.test.jsx index 201fb6b116..1d07a9ae52 100644 --- a/src/course-unit/CourseUnit.test.jsx +++ b/src/course-unit/CourseUnit.test.jsx @@ -1616,7 +1616,7 @@ describe('', () => { userEvent.click(xblockEditBtn); - const iframePostMsg = getIFramePostMessages('close_edit_modal'); + const iframePostMsg = getIFramePostMessages('close_modal'); const editModalIFrame = getByTitle('xblock-edit-modal-iframe'); expect(editModalIFrame).toHaveAttribute('src', `${getConfig().STUDIO_BASE_URL}/xblock/${courseVerticalChildrenMock.children[0].block_id}/actions/edit`); diff --git a/src/course-unit/course-xblock/CourseXBlock.jsx b/src/course-unit/course-xblock/CourseXBlock.jsx index 003c7ed870..8caa70ae5b 100644 --- a/src/course-unit/course-xblock/CourseXBlock.jsx +++ b/src/course-unit/course-xblock/CourseXBlock.jsx @@ -86,17 +86,12 @@ const CourseXBlock = memo(({ useEffect(() => { const handleMessage = (event) => { const { method, params } = event.data; - - if (method === 'close_edit_modal') { + console.log('method', method); + if (method === 'close_modal') { toggleLegacyEditModal(false); dispatch(fetchCourseVerticalChildrenData(blockId)); dispatch(fetchXBlockIFrameHtmlAndResourcesQuery(id)); dispatch(fetchCourseUnitQuery(blockId)); - } else if (method === 'close_move_modal') { - toggleLegacyMoveModal(false); - dispatch(fetchCourseVerticalChildrenData(blockId)); - dispatch(fetchXBlockIFrameHtmlAndResourcesQuery(id)); - dispatch(fetchCourseUnitQuery(blockId)); } else if (method === 'move_xblock') { toggleLegacyMoveModal(false); dispatch(updateMovedXBlockParams({