diff --git a/api/js/etemplate/et2_widget_textbox.js b/api/js/etemplate/et2_widget_textbox.js index c31eb85f1a..43091ed991 100644 --- a/api/js/etemplate/et2_widget_textbox.js +++ b/api/js/etemplate/et2_widget_textbox.js @@ -101,7 +101,7 @@ var et2_textbox = /** @class */ (function (_super) { }; et2_textbox.prototype.getValue = function () { // only return "" for blur-value, if browser does not support html5 placeholder - if (this.options && this.options.blur && + if (this.options && this.options.blur && this.input && !this.input[0].placeholder && this.input.val() == this.options.blur) { return ""; @@ -493,6 +493,10 @@ var et2_searchbox = /** @class */ (function (_super) { this._searchToggleState(); _super.prototype.change.apply(this, arguments); }; + et2_searchbox.prototype.getInputNode = function () { + var _a; + return (_a = this.search) === null || _a === void 0 ? void 0 : _a.input.get(0); + }; et2_searchbox.prototype.get_value = function () { return this.search.input.val(); }; diff --git a/api/js/etemplate/et2_widget_textbox.ts b/api/js/etemplate/et2_widget_textbox.ts index c6e6daa27a..0c796cefac 100644 --- a/api/js/etemplate/et2_widget_textbox.ts +++ b/api/js/etemplate/et2_widget_textbox.ts @@ -162,7 +162,7 @@ export class et2_textbox extends et2_inputWidget implements et2_IResizeable getValue() { // only return "" for blur-value, if browser does not support html5 placeholder - if (this.options && this.options.blur && + if (this.options && this.options.blur && this.input && !(this.input[0]).placeholder && this.input.val() == this.options.blur) { @@ -581,6 +581,10 @@ class et2_searchbox extends et2_textbox super.change.apply(this,arguments); } + getInputNode(): HTMLElement + { + return this.search?.input.get(0); + } get_value() {