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
When the ValidationSummary is define at the top of the EditForm, and you have existing errors in the form, if you fix the error and then immediately click the submit button, the errors are fixed however the submit button does not invoke OnValidSubmit.
If you define the ValidationSummary at the end of the EditForm and perform the same task, it will work as expected.
I believe this is occurring because when you click the submit button, focus is lost from the inputs which causes the errors to be fixed, however the submit button is not actually clicked. Therefore the OnValidSubmit event is not fired.
To Reproduce
Steps to reproduce the behavior:
Using this version of ASP.NET Core 3.0.100-preview7-012821
Run this code (see above snippets)
Expected behavior
When the ValidationSummary is defined at the top of the EditForm, and an error is fixed. I should should be able to click the submit button and have the OnValidSubmit event invoked
The text was updated successfully, but these errors were encountered:
brianlagunas
changed the title
OnValidSubmit not invoked when submit button clicked
[Blazor] OnValidSubmit not invoked when submit button clicked
Aug 6, 2019
From the video it looks like the button is not clicked the first time because the content jumps up because the validation message is removed. I would suggest adding some CSS so the content does not jump or try use the keyboard navigation e.g. tab -> enter then it should work the first time.
Describe the bug
When the ValidationSummary is define at the top of the EditForm, and you have existing errors in the form, if you fix the error and then immediately click the submit button, the errors are fixed however the submit button does not invoke OnValidSubmit.
If you define the ValidationSummary at the end of the EditForm and perform the same task, it will work as expected.
This doesn't work
This works:
I believe this is occurring because when you click the submit button, focus is lost from the inputs which causes the errors to be fixed, however the submit button is not actually clicked. Therefore the OnValidSubmit event is not fired.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When the ValidationSummary is defined at the top of the EditForm, and an error is fixed. I should should be able to click the submit button and have the OnValidSubmit event invoked
Screenshots
Video of bug: https://clips.twitch.tv/AuspiciousDepressedSproutPeteZarollTie
Video of workaround: https://www.twitch.tv/videos/463432083
The text was updated successfully, but these errors were encountered: