iNeoO / vue-meeting-selector

This component is inspired from the meeting selector from doctolib with the power of Vuejs components.
https://vue-meeting-selector.tuturu.io
96 stars 19 forks source link

Use <button type=button> to avoid triggering form submissions #7

Closed marcorivm closed 4 years ago

marcorivm commented 4 years ago

See https://stackoverflow.com/a/3315016/701444 for some reference.

But basically while inside a form when using a button element without a type it will default to <button type=submit> this will cause the parent form to submit, while this could be handled on the form, there shouldn't be a need for extra code circumvent this.

Adding the type attribute to the buttons avoids this issue and doesn't mess with current functionality

iNeoO commented 4 years ago

thx !