Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix editing on non-external markdown levels #37567

Merged
merged 1 commit into from Oct 30, 2020
Merged

Conversation

davidsbailey
Copy link
Member

@davidsbailey davidsbailey commented Oct 30, 2020

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:
test

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:
Screen Shot 2020-10-29 at 5 01 13 PM

This caused the ajax-handling code here never to execute:

module.exports = function ajaxSubmit(form_selector) {
$(document).ready(function() {
$(form_selector).on('ajax:beforeSend', function(e, xhr) {

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.

@davidsbailey davidsbailey marked this pull request as ready for review October 30, 2020 00:39
Copy link
Contributor

@bethanyaconnor bethanyaconnor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for breaking and thanks for fixing!

@davidsbailey davidsbailey merged commit 611f383 into staging Oct 30, 2020
@davidsbailey davidsbailey deleted the fix-non-external-dsl branch October 30, 2020 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants