TIL: that the <button> element in HTML5 will cause a form to submit when clicked (instead of any other behaviour you expect) because <button> has a default value of, get this… type="submit".

You would think <button> would have a default type of “button”, but no. Bloody hell lol.

This Stackoverflow answer saved me from further headaches.

⤋ Read More