Skip to content

Commit 81fc0bd

Browse files
authored
Merge pull request #37535 from openedx/feanil/xblocks_with_children_rendering_fix
fix: Adding components to xblocks with children.
2 parents 86d9b08 + 3c5cc6f commit 81fc0bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cms/static/js/views/pages/container.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ function($, _, Backbone, gettext, BasePage,
305305

306306
renderAddXBlockComponents: function() {
307307
var self = this;
308-
if (self.options.canEdit && (!self.options.isIframeEmbed || self.isSplitTestContentPage)) {
308+
// If the container is the Unit element(aka Vertical), then we don't render the
309+
// add buttons because those should get rendered by the authoring MFE
310+
if (self.options.canEdit && (!self.options.isIframeEmbed || !self.model.isVertical())) {
309311
this.$('.add-xblock-component').each(function(index, element) {
310312
var component = new AddXBlockComponent({
311313
el: element,

0 commit comments

Comments
 (0)