diff --git a/src/commands/view/ComponentExit.js b/src/commands/view/ComponentExit.js index 8d01f9f0e..0367723c0 100644 --- a/src/commands/view/ComponentExit.js +++ b/src/commands/view/ComponentExit.js @@ -1,6 +1,6 @@ module.exports = { - run(ed) { - if (!ed.Canvas.hasFocus()) return; + run(ed, snd, opts = {}) { + if (!ed.Canvas.hasFocus() && !opts.force) return; const toSelect = []; ed.getSelectedAll().forEach(component => { diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index f6c0e6a5c..8dc36f140 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -611,7 +611,7 @@ const Component = Backbone.Model.extend(Styleable).extend( if (model.collection) { tb.push({ attributes: { class: 'fa fa-arrow-up' }, - command: 'core:component-exit' + command: ed => ed.runCommand('core:component-exit', { force: 1 }) }); } if (model.get('draggable')) {