View Code? Open in Web Editor
NEW
Reproduce problem with phx-feedback-for for input[type="checkbox"]
Elixir 72.16%
CSS 0.16%
JavaScript 2.60%
HTML 25.09%
repro_liveview_checkbox's Introduction
Phoenix LiveView checkbox phx-feedback-for
issue
<.input type="checkbox" />
is added to a form with a phx-change
for changeset
- On page load the
phx-no-feedback
class is applied (as it should)
- When the checkbox is checked, the
phx-no-feedback
class is removed (as it should)
- Upon interacting with any another element in the form the
phx-no-feedback
class is reapplied for the checkbox (this is the problematic behavior)
- Clone
gh repo clone benregn/repro_liveview_checkbox
or https://github.com/benregn/repro_liveview_checkbox.git
mix phx.server
- Go to http://localhost:4004/users/new
- Inspect the checkbox element (it has the
phx-no-feedback
class)
- Check the "Accept T&C" checkbox (
phx-no-feedback
class is removed)
- Type into one of the text inputs (the
phx-no-feedback
class is added back to the checkbox element)