diff --git a/src/region.js b/src/region.js index f517ace32f..3e6c6a6adc 100644 --- a/src/region.js +++ b/src/region.js @@ -133,6 +133,8 @@ const Region = MarionetteObject.extend({ if (!_.isObject(this.el)) { this.$el = this.getEl(this.el); this.el = this.$el[0]; + // Make sure the $el contains only the el + this.$el = this.getEl(this.el); } if (!this.$el || this.$el.length === 0) { @@ -242,7 +244,7 @@ const Region = MarionetteObject.extend({ // Override this method to change how the new view is appended to the `$el` that the // region is managing attachHtml(view) { - this.Dom.appendContents(this.el, view.el, {_$contents: view.$el}); + this.Dom.appendContents(this.el, view.el, {_$el: this.$el, _$contents: view.$el}); }, // Destroy the current view, if there is one. If there is no current view, it does