1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 11:46:13 +02:00
metamask-extension/ui/app/pages/create-account
Mark Stacey 87d181b347
Fix hardware account selection (#10198)
Fixes #9244

When trying to connect a Trezor account on a fresh install of MetaMask,
the radio buttons on the account selection page would not respond to
being clicked.

When debugging this, it looks like the `onChange` event was never
triggered. A radio `<input>` element should trigger `onChange` whenever
the selection state change, but seemingly this wouldn't happen if the
change in selection state was undone during the same render cycle. If
I paused at a breakpoint during the render, I could see the checkbox
get selected then unselected again without triggering `onChange`.

The simplest fix was to use `onClick` instead of `onChange`. This seems
more appropriate anyway because we're treating the radio button as a
controlled component here, so the state of the underlying element isn't
really of any concern.
2021-01-18 12:46:24 -03:30
..
connect-hardware Fix hardware account selection (#10198) 2021-01-18 12:46:24 -03:30
import-account [RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
tests Use strict equality in unit tests (#9966) 2020-12-03 09:46:22 -06:00
create-account.component.js [RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
index.js Remove unused current view related things (#7843) 2020-01-16 13:02:44 -04:00
index.scss normalize page font styles (#9697) 2020-10-29 11:31:48 -05:00
new-account.component.js [RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
new-account.container.js [RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00