html icon indicating copy to clipboard operation
html copied to clipboard

Warn users 'button' will submit the form by default

Open roosemberth opened this issue 3 years ago • 0 comments

By default Html.button is an input of type 'submit'. This may be yield surprising results when using the onClick attribute on a button, effectively firing two events (one for the click and another one for the form submit).

This commit adds a word of caution in the button element documentation to warn users of this behavior and how to prevent it.

roosemberth avatar Jul 23 '22 22:07 roosemberth