oasis-wallet-web
oasis-wallet-web copied to clipboard
Replace click listeners on submit buttons with submit listeners on forms
Related to https://github.com/oasisprotocol/oasis-wallet-web/pull/1037#pullrequestreview-1124333939
Although accessibility is good in both cases (both trigger submit on Enter and on click), only <Form onSubmit
handles validation. Fix it upstream or add types+lint to enforce correct usage.
Before:
<Form>
<Button type="submit" onClick={onSubmit}>
After:
<Form onSubmit={onSubmit}>
<Button type="submit">
@lukaw3d please, can you assign the issue to me? I submitted a PR fixing it
Sure! I'll keep the issue open for the "Fix it upstream or add types+lint to enforce correct usage" part