diff --git a/cms/static/js/views/pages/container.js b/cms/static/js/views/pages/container.js index a8a9485bbb2..69b28e920bd 100644 --- a/cms/static/js/views/pages/container.js +++ b/cms/static/js/views/pages/container.js @@ -458,7 +458,8 @@ function($, _, Backbone, gettext, BasePage, // Create a placeholder that will become the new block(s) const $insertSpot = xblockElement.find('.insert-new-lib-blocks-here'); doneAddingBlock = (addResult) => { - const placeholderElement = $(this.createPlaceholderElement()).insertBefore($insertSpot); + const $placeholderEl = $(this.createPlaceholderElement()); + const placeholderElement = $placeholderEl.insertBefore($insertSpot); placeholderElement.data('locator', addResult.locator); return this.refreshXBlock(placeholderElement, true); };