You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Html form method=dialog functionality stops working when a formsModule is loaded. #47150
Clicking the submit button should close the dialog and raise an event. You can see this working in the attached StackBlitz.
The App-component works, while the forms-component doesn't fire the event.
Please provide a link to a minimal reproduction of the bug
changed the title [-]Html `form method=dialog` is functionality stops working when a formsModule is loaded.[/-][+]Html `form method=dialog` functionality stops working when a formsModule is loaded.[/+]on Aug 13, 2022
@crisbeto - after Your PR - imagine we have validation and we want to test that validation on submit, in case of form is invalid show a toast but stop closing the dialog. Now button type="submit" will only trigger ngSubmit, and leave the dialog open, but after PR to prevent autoclosing we will only need to call event.preventDefault() and it should stop dialog auto closing right?
Activity
[-]Html `form method=dialog` is functionality stops working when a formsModule is loaded.[/-][+]Html `form method=dialog` functionality stops working when a formsModule is loaded.[/+]kbrilla commentedon Aug 31, 2022
@crisbeto - after Your PR - imagine we have validation and we want to test that validation on submit, in case of form is invalid show a toast but stop closing the dialog. Now
button type="submit"will only trigger ngSubmit, and leave the dialog open, but after PR to prevent autoclosing we will only need to callevent.preventDefault()and it should stop dialog auto closing right?crisbeto commentedon Aug 31, 2022
Yeah, you still have access to the submit event in the
ngSubmithandler so you can callpreventDefaultyourself.fix(forms): don't prevent default behavior for forms with method="dia…
fix(forms): don't prevent default behavior for forms with method="dia…
angular-automatic-lock-bot commentedon Oct 10, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.