I would agree this is an antipattern, but you can prevent the default behavior of the browser by:
- Adding an
onKeyDown
handler - Checking the 'Prevent Default' box in the options
From there, clicking the button will send onClick
but pressing enter or spacebar will not.