Ensure highlighted block when it is re-rendered during edit

[MAILPOET-1805]
This commit is contained in:
Rostislav Wolny
2019-02-27 09:18:18 +01:00
committed by M. Shull
parent c9a70c4870
commit 837a380642

View File

@@ -21,4 +21,10 @@ BL.HighlightEditingBehavior = Marionette.Behavior.extend({
this.view.hideTools();
this.$el.removeClass('mailpoet_highlight');
},
onDomRefresh: function onDomRefresh() {
if (this.view._isBeingEdited) {
this.view.showTools();
this.$el.addClass('mailpoet_highlight');
}
},
});