I was able to replicate the issue on StackBlitz using minimal code.
To reproduce:
- Step 1: Input a word in the text field and press Enter on the keyboard.
- Step 2: A modal will pop up.
- Step 3: Hit Enter again on the keyboard.
During Step 2, I encountered the following error:
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ng-untouched: true'. Current value: 'ng-untouched: false'.
Although Step 3 is supposed to close the modal, it actually reopens it. However, clicking on the confirm button with the mouse does properly close the modal.