Closed ktaze1 closed 4 years ago
I think it is because the button threated as an implicit submit button for the form, thus submitting the form. If you change the button to be:
<button @onclick="ShowModal" type="button" class="btn btn-primary">Show Modal</button>
It should work again. This is because you explicitly set the button type, so it can't be the implicit submit button anymore.
Seems like it. Thanks!
I was trying to use Modal in my user profile page and after I clicked to Modal button, I thought it killed the page but after few minutes I came to conclusion that it just tries to redirect and gives 404 Not Found.
First I thought it might be happening because it takes time to fetch the data from a database and I've something like this:
But no. Problem happens if button is inside of a form tag.
To Reproduce Steps to reproduce the behavior: Try to call button with ShowModal inside of a form tag
Hosting Model (is this issue happening with a certain hosting model?):
I don't need to use form tag on this particular time but some people might in the future.