mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-08 14:47:40 +00:00
fix(console): placeholder accessor (#6849)
* fix(console): placeholder accessor * cleanup
This commit is contained in:
parent
a2a02598d0
commit
814e09f1d5
@ -363,7 +363,8 @@ export class InputDirective
|
|||||||
private _dirtyCheckPlaceholder(): void {
|
private _dirtyCheckPlaceholder(): void {
|
||||||
// If we're hiding the native placeholder, it should also be cleared from the DOM, otherwise
|
// If we're hiding the native placeholder, it should also be cleared from the DOM, otherwise
|
||||||
// screen readers will read it out twice: once from the label and once from the attribute.
|
// screen readers will read it out twice: once from the label and once from the attribute.
|
||||||
const placeholder = null;
|
const placeholder = this._getPlaceholder();
|
||||||
|
|
||||||
if (placeholder !== this._previousPlaceholder) {
|
if (placeholder !== this._previousPlaceholder) {
|
||||||
const element = this._elementRef.nativeElement;
|
const element = this._elementRef.nativeElement;
|
||||||
this._previousPlaceholder = placeholder;
|
this._previousPlaceholder = placeholder;
|
||||||
@ -371,6 +372,11 @@ export class InputDirective
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Gets the current placeholder of the form field. */
|
||||||
|
protected _getPlaceholder(): string | null {
|
||||||
|
return this.placeholder || null;
|
||||||
|
}
|
||||||
|
|
||||||
/** Does some manual dirty checking on the native input `value` property. */
|
/** Does some manual dirty checking on the native input `value` property. */
|
||||||
protected _dirtyCheckNativeValue(): void {
|
protected _dirtyCheckNativeValue(): void {
|
||||||
const newValue = this._elementRef.nativeElement.value;
|
const newValue = this._elementRef.nativeElement.value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user