fix editing on non-external markdown levels #37567
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
editing of multi levels was reported here: https://codedotorg.slack.com/archives/CA3KCSGTD/p1603994532318000 the page does not navigate after clicking save, but the edits made appear persist:
This PR fixes the regression, which was introduced in https://github.com/code-dot-org/code-dot-org/pull/35683/files#diff-eefd248014f6b9740cc3067f810e31bb979e3369f3d2abf425f93e3af759229bR35 , by fixing the parts of that PR that broke things. That PR wiped out the editor components needed for markdown editor fields on DSL-defined levels. without those fields, the initialization code failed:
This caused the ajax-handling code here never to execute:
code-dot-org/apps/src/code-studio/ajaxSubmit.js
Lines 3 to 5 in 1cad5ac
presumably leading to the navigation not happening after save.
Testing story
I will follow up with an attempt to add a UI test to cover saving of a multi level.