diff --git a/src/Squidex/app/framework/angular/forms/control-errors.component.ts b/src/Squidex/app/framework/angular/forms/control-errors.component.ts index d58093df1..a481fcdee 100644 --- a/src/Squidex/app/framework/angular/forms/control-errors.component.ts +++ b/src/Squidex/app/framework/angular/forms/control-errors.component.ts @@ -60,7 +60,8 @@ export class ControlErrorsComponent extends StatefulComponent implements public ngOnDestroy() { super.ngOnDestroy(); - this.restoreOriginalMarkAsTouchedFunction(); + + this.unsetCustomMarkAsTouchedFunction(); } public ngOnChanges() { @@ -84,7 +85,7 @@ export class ControlErrorsComponent extends StatefulComponent implements if (this.control !== control) { this.unsubscribeAll(); - this.restoreOriginalMarkAsTouchedFunction(); + this.unsetCustomMarkAsTouchedFunction(); this.control = control; @@ -110,10 +111,10 @@ export class ControlErrorsComponent extends StatefulComponent implements this.createMessages(); } - private restoreOriginalMarkAsTouchedFunction() { - if (this.control && this.originalMarkAsTouched) { - this.control['markAsTouched'] = this.originalMarkAsTouched; - } + private unsetCustomMarkAsTouchedFunction() { + if (this.control && this.originalMarkAsTouched) { + this.control['markAsTouched'] = this.originalMarkAsTouched; + } } private createMessages() {