-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using MatDialogClose breaks default form submit functionality #16909
Comments
More about the reason behind that you can see here #2599. |
I don't understand why it would override |
I agree with you, that is something that needs to be supported, if you don't define button type then it should work like it's working, but if you define it then this value should be used instead. |
Agreed that it shouldn't change the |
only default the type attribute on mat-dialog-close if it isn't set angular#16909
only default the type attribute on mat-dialog-close if it isn't set #16909
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Reproduction
StackBlitz: https://stackblitz.com/edit/components-issue-bde981
Steps to reproduce:
Doesn't Work
button to open the dialogExpected Behavior
In the working example hitting enter submits the form and in this case, closes the dialog. I wouldn't expect that adding
the
MatDialogClose
directive in place of the click method would change that.Actual Behavior
Adding
MatDialogClose
prevents the form from being submitted when hitting enter and not having the button focused.Environment
The text was updated successfully, but these errors were encountered: