diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index 8099fda642..7fe5a43fc8 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -148,14 +148,14 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T) this.node = this.getInputNode(); this.updateComplete.then(() => { - this.addEventListener("change", this._oldChange); + this.addEventListener(typeof (<any>this).handleChange === 'function' ? 'sl-change' : 'change', this._oldChange); }); } disconnectedCallback() { super.disconnectedCallback(); - this.removeEventListener("change", this._oldChange); + this.removeEventListener(typeof (<any>this).handleChange === 'function' ? 'sl-change' : 'change', this._oldChange); } /** diff --git a/api/js/etemplate/Et2Url/Et2InvokerMixin.ts b/api/js/etemplate/Et2Url/Et2InvokerMixin.ts index e4fee61d2c..811e76346a 100644 --- a/api/js/etemplate/Et2Url/Et2InvokerMixin.ts +++ b/api/js/etemplate/Et2Url/Et2InvokerMixin.ts @@ -179,6 +179,19 @@ export const Et2InvokerMixin = dedupeMixin(<T extends Constructor<LitElement>>(s } } + /** + * Reimplemented to enable/disable invoker on content change + * + * @param _ev + * @returns + */ + _oldChange(_ev: Event): boolean + { + this._toggleInvokerDisabled(); + + return super._oldChange(_ev); + } + /** @param {import('@lion/core').PropertyValues } changedProperties */ firstUpdated(changedProperties) {