forked from extern/egroupware
only return "" for blur-value, if browser does not support html5 placeholder
This commit is contained in:
parent
ec6ebaa85a
commit
06c40e1f1f
@ -99,8 +99,12 @@ var et2_textbox = /** @class */ (function (_super) {
|
|||||||
_super.prototype.destroy.call(this);
|
_super.prototype.destroy.call(this);
|
||||||
};
|
};
|
||||||
et2_textbox.prototype.getValue = function () {
|
et2_textbox.prototype.getValue = function () {
|
||||||
if (this.options && this.options.blur && this.input.val() == this.options.blur)
|
// only return "" for blur-value, if browser does not support html5 placeholder
|
||||||
|
if (this.options && this.options.blur &&
|
||||||
|
!this.input[0].placeholder &&
|
||||||
|
this.input.val() == this.options.blur) {
|
||||||
return "";
|
return "";
|
||||||
|
}
|
||||||
return _super.prototype.getValue.call(this);
|
return _super.prototype.getValue.call(this);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
@ -161,7 +161,13 @@ export class et2_textbox extends et2_inputWidget implements et2_IResizeable
|
|||||||
|
|
||||||
getValue()
|
getValue()
|
||||||
{
|
{
|
||||||
if(this.options && this.options.blur && this.input.val() == this.options.blur) return "";
|
// only return "" for blur-value, if browser does not support html5 placeholder
|
||||||
|
if (this.options && this.options.blur &&
|
||||||
|
!(<HTMLInputElement>this.input[0]).placeholder &&
|
||||||
|
this.input.val() == this.options.blur)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
return super.getValue();
|
return super.getValue();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user