diff --git a/api/js/etemplate/et2_widget_taglist.js b/api/js/etemplate/et2_widget_taglist.js index 822816f79c..67d40c6d1b 100644 --- a/api/js/etemplate/et2_widget_taglist.js +++ b/api/js/etemplate/et2_widget_taglist.js @@ -273,6 +273,8 @@ var et2_taglist = /** @class */ (function (_super) { widget.onfocus.call(widget.taglist, e, widget); }); } + // Input widget was not created when ID was set, re-set now to make sure input gets name attribute + this.set_id(this.id); // Do size limit checks this.resize(); // Make sure magicsuggest loses focus class to prevent issues with @@ -400,7 +402,7 @@ var et2_taglist = /** @class */ (function (_super) { return label; }; et2_taglist.prototype.getInputNode = function () { - return this.div ? this.div.filter("input")[0] : null; + return this.div ? this.div.find("input")[0] : null; }; et2_taglist.prototype.set_autocomplete_url = function (source) { if (source && source[0] != '/' && source.indexOf('http') != 0) { diff --git a/api/js/etemplate/et2_widget_taglist.ts b/api/js/etemplate/et2_widget_taglist.ts index 78f55c50ac..de7bd4c0ba 100644 --- a/api/js/etemplate/et2_widget_taglist.ts +++ b/api/js/etemplate/et2_widget_taglist.ts @@ -422,6 +422,9 @@ export class et2_taglist extends et2_selectbox implements et2_IResizeable }); } + // Input widget was not created when ID was set, re-set now to make sure input gets name attribute + this.set_id(this.id); + // Do size limit checks this.resize(); @@ -576,7 +579,7 @@ export class et2_taglist extends et2_selectbox implements et2_IResizeable getInputNode(): HTMLElement { - return this.div ? this.div.filter("input")[0] : null; + return this.div ? this.div.find("input")[0] : null; } set_autocomplete_url(source)