matyunya / smelte

UI framework with material components built with Svelte and Tailwind CSS

Home Page:https://smeltejs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] All buttons will submit the form

SanderVerkuil opened this issue · comments

When having the datepicker inside a form, the buttons to click on the 'next' and 'previous' month also trigger the 'submit' event on the form.
According to the W3C spec the default type of a button is 'submit', so all buttons that don't have a type will submit the parent form.
This issue can be resolved by having a default type value of 'button'.