File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ const ScheduleAndDetails = ({ intl, courseId }) => {
116116 license,
117117 language,
118118 subtitle,
119- overview,
120119 duration,
121120 selfPaced,
122121 startDate,
@@ -127,7 +126,6 @@ const ScheduleAndDetails = ({ intl, courseId }) => {
127126 instructorInfo,
128127 enrollmentStart,
129128 shortDescription,
130- aboutSidebarHtml,
131129 preRequisiteCourses,
132130 entranceExamEnabled,
133131 courseImageAssetPath,
@@ -139,6 +137,12 @@ const ScheduleAndDetails = ({ intl, courseId }) => {
139137 } = editedValues ;
140138
141139 useScrollToHashElement ( { isLoading } ) ;
140+ // No need to get overview and aboutSidebarHtml from editedValues
141+ // As updating them re-renders TinyMCE
142+ // Which causes issues with TinyMCE editor cursor position
143+ // https://www.tiny.cloud/docs/tinymce/5/react/#initialvalue
144+ const { overview : initialOverview } = courseDetails || { } ;
145+ const { aboutSidebarHtml : initialAboutSidebarHtml } = courseDetails || { } ;
142146
143147 if ( isLoading ) {
144148 // eslint-disable-next-line react/jsx-no-useless-fragment
@@ -276,12 +280,12 @@ const ScheduleAndDetails = ({ intl, courseId }) => {
276280 ) }
277281 < IntroducingSection
278282 title = { title }
279- overview = { overview }
283+ overview = { initialOverview }
280284 duration = { duration }
281285 subtitle = { subtitle }
282286 introVideo = { introVideo }
283287 description = { description }
284- aboutSidebarHtml = { aboutSidebarHtml }
288+ aboutSidebarHtml = { initialAboutSidebarHtml }
285289 shortDescription = { shortDescription }
286290 aboutPageEditable = { aboutPageEditable }
287291 sidebarHtmlEnabled = { sidebarHtmlEnabled }
You can’t perform that action at this time.
0 commit comments