diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index 1b4e05f4..c6fc02a5 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -978,7 +978,7 @@ class Widget extends EventEmitter { // emit prop-changed event if not already // to make sure an advanced syntax changes don't go unnoticed by clone var unNotified = propNames.filter(n => !changedProps.includes(n)) - widgetManager.trigger('prop-changed', { + widgetManager.trigger('prop-changed-maybe', { id: this.getProp('id'), props: unNotified, widget: this, diff --git a/src/client/widgets/containers/clone.js b/src/client/widgets/containers/clone.js index 7aa87be1..22badfb4 100644 --- a/src/client/widgets/containers/clone.js +++ b/src/client/widgets/containers/clone.js @@ -95,7 +95,7 @@ class Clone extends Container() { }, {context: this}) - widgetManager.on('prop-changed', (e)=>{ + var onPropChanged = (e)=>{ // watch for prop changes initiated by the editor // Other changes (from advanced syntaxes) are already // handled by standard widget mechanicsé @@ -109,7 +109,12 @@ class Clone extends Container() { } - }, {context: this}) + } + + widgetManager.on('prop-changed', onPropChanged, {context: this}) + + // see common/widget.js @ updateProps() + widgetManager.on('prop-changed-maybe', onPropChanged, {context: this}) this.on('widget-created', (e)=>{