diff --git a/src/block_manager/model/Block.js b/src/block_manager/model/Block.js index 3193cb80e..a043a27d8 100644 --- a/src/block_manager/model/Block.js +++ b/src/block_manager/model/Block.js @@ -6,7 +6,7 @@ module.exports = Backbone.Model.extend({ // If true, triggers an 'active' event on dropped component activate: 0, // If true, the dropped component will be selected - select: 1, + select: 0, // If true, all IDs of dropped component and its style will be changed resetId: 0, label: '', diff --git a/src/dom_components/model/Components.js b/src/dom_components/model/Components.js index 574a3f92c..92943fb23 100644 --- a/src/dom_components/model/Components.js +++ b/src/dom_components/model/Components.js @@ -37,11 +37,10 @@ module.exports = Backbone.Collection.extend({ const cssc = em.get('CssComposer'); const parsed = em.get('Parser').parseHtml(value); - if (parsed.css && cssc) { - const { avoidUpdateStyle } = opt; + if (parsed.css && cssc && !opt.temporary) { cssc.addCollection(parsed.css, { - extend: 1, - avoidUpdateStyle + ...opt, + extend: 1 }); } @@ -62,7 +61,7 @@ module.exports = Backbone.Collection.extend({ return Backbone.Collection.prototype.add.apply(this, [models, opt]); }, - onAdd(model, c, opts) { + onAdd(model, c, opts = {}) { const em = this.em; const style = model.getStyle(); const avoidInline = em && em.getConfig('avoidInlineStyle'); @@ -72,7 +71,8 @@ module.exports = Backbone.Collection.extend({ !avoidInline && em && em.get && - em.getConfig('forceClass') + em.getConfig('forceClass') && + !opts.temporary ) { const name = model.cid; const rule = em.get('CssComposer').setClassRule(name, style);