Refactor button element to stop preventing event bubbling
The problem that was to be solved is that buttons within a form always cause form validation for all form elements. Which is not wanted here. The better solution than preventing all event is to simply declare the button type. As button without any type are treated as submit buttons.
Loading
Please register or sign in to comment