diff --git a/src/schedule-and-details/index.jsx b/src/schedule-and-details/index.jsx index f8d114f44d..bbde3f06f5 100644 --- a/src/schedule-and-details/index.jsx +++ b/src/schedule-and-details/index.jsx @@ -116,7 +116,6 @@ const ScheduleAndDetails = ({ intl, courseId }) => { license, language, subtitle, - overview, duration, selfPaced, startDate, @@ -127,7 +126,6 @@ const ScheduleAndDetails = ({ intl, courseId }) => { instructorInfo, enrollmentStart, shortDescription, - aboutSidebarHtml, preRequisiteCourses, entranceExamEnabled, courseImageAssetPath, @@ -139,6 +137,12 @@ const ScheduleAndDetails = ({ intl, courseId }) => { } = editedValues; useScrollToHashElement({ isLoading }); + // No need to get overview and aboutSidebarHtml from editedValues + // As updating them re-renders TinyMCE + // Which causes issues with TinyMCE editor cursor position + // https://www.tiny.cloud/docs/tinymce/5/react/#initialvalue + const { overview: initialOverview } = courseDetails || {}; + const { aboutSidebarHtml: initialAboutSidebarHtml } = courseDetails || {}; if (isLoading) { // eslint-disable-next-line react/jsx-no-useless-fragment @@ -276,12 +280,12 @@ const ScheduleAndDetails = ({ intl, courseId }) => { )}