Consider the following demo https://stackblitz.com/edit/angular-pur1dt
I have reactive form control with sync validator and error message shown below the field when it is invalidated.
Validation is triggered when control loses focus. Below the control there is a button that has a click handler. The problem is that when I click the button, control loses focus, validation happens, error message shown and moves the button down. And supposedly this prevents click handler from executing. Any suggestions why this happens and how to fix the issue?
I've updated the demo with comments. Note: only button below the input will reproduce the issue. The title wont be updated after you click it for the first time.
<button [disabled]="form.invalid" (click)="onClick($event)">click OK</button>
If the form is invalid the button will be disabled - Daniel C.