`focus-in` vs `focusIn` on text inputs vs checkboxes
See original GitHub issueOn text inputs, both focus-in and focusIn work (although the handlers are passed different arguments), while on checkboxes, only focusIn does. See: https://ember-twiddle.com/6f82aa1cce20e0831e285c172ca7e998
I found this difference fairly surprising (and wasted more time than I care to admit trying to track down why actions attached to focus-in on my checkboxes weren’t firing)
The cause of the behavior difference is that focusIn is the default event name, while the action assigned to focus-in is used as the default focusIn handler by the TextSupport mixin (thanks for the pointer, @alexspeller!). I haven’t really figured out why this distinction exists (historical reasons, perhaps?), but it would be nice if this was consistent (or at least made more clear in the docs). At the moment the sections for actions and checkboxes are actually adjacent on the input helpers page, so it literally reads:
Event Names must be dasherized.
Checkboxes
You can also use the {{input}} helper to create a checkbox by setting its type
which is fairly misleading.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (6 by maintainers)

Top Related StackOverflow Question
@gabrielgrant Thank you for the descriptive issue and the reproduction in the Twiddle! I’m myself not aware why both event name styles exist for the
input[type=text]helper, but from a learning perspective I think the Guides should just mention the one type of wording that works for all input helpers as you already suggested.Thanks for the update, closing it!