diff --git a/src/commands/index.js b/src/commands/index.js index 934f778e9..804136b6f 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -345,7 +345,7 @@ module.exports = () => { const id = command.id; const editor = em.get('Editor'); - if (!this.isActive(id)) { + if (!this.isActive(id) || options.force) { if (id && command.stop && !command.noStop) { active[id] = result; } @@ -370,7 +370,7 @@ module.exports = () => { const id = command.id; const editor = em.get('Editor'); - if (this.isActive(id)) { + if (this.isActive(id) || options.force) { if (id) delete active[id]; result = command.callStop(editor, options); } diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index 4a1732b40..8b5b57e37 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -178,7 +178,6 @@ module.exports = { onClick(e) { e.stopPropagation(); const $el = $(e.target); - const editor = this.editor; let model = $el.data('model'); if (!model) { @@ -475,7 +474,8 @@ module.exports = { if (typeof resizable == 'object') { options = { ...options, ...resizable }; } - editor.runCommand('resize', { el, options }); + + editor.runCommand('resize', { el, options, force: 1 }); // On undo/redo the resizer rect is not updating, need somehow to call // this.updateRect on undo/redo action