Skip to content

Commit

Permalink
Remove preventDefault from 'create as public' checkbox (#5709)
Browse files Browse the repository at this point in the history
# Motivation

`preventDefault` on the `Checkbox` component prevents the checkbox from
visibly toggling when the checkbox is clicked directly (as opposed to
the text label being clicked).
The underlying `boolean` variable still toggles so it's even possible
that a public neuron is created while the checkbox looked unchecked.

# Changes

Remove `preventDefault` from `"as-public-neuron-checkbox"` component in
`NnsStakeNeuron`.

# Tests

1. I tried to create a unit test but it doesn't appear to be
reproducible in the unit test framework.
2. Tested manually.

# Todos

- [ ] Add entry to changelog (if necessary).
not necessary
  • Loading branch information
dskloetd authored Oct 30, 2024
1 parent 80a480a commit c17fd3b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion frontend/src/lib/components/neurons/NnsStakeNeuron.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
<Separator spacing="small" />

<Checkbox
preventDefault
testId="as-public-neuron-checkbox"
inputId="as-public-neuron-checkbox"
checked={asPublicNeuron}
Expand Down

0 comments on commit c17fd3b

Please sign in to comment.