# Missing onInput events in Safari

**URL:** <https://discourse.elm-lang.org/t/missing-oninput-events-in-safari/3325>\
**Category:** Learn\
**Created:** [March 14, 2019, 6:37pm UTC](https://discourse.elm-lang.org/t/missing-oninput-events-in-safari/3325 "2019-03-14T18:37:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/rob/32/589_2.png) [@rob](https://discourse.elm-lang.org/u/rob)\
**Post date:** [March 14, 2019, 6:37pm UTC](https://discourse.elm-lang.org/t/missing-oninput-events-in-safari/3325/1 "2019-03-14T18:37:25Z")

</div>

I’m at a loss right now why I don’t seem to be seeing any `onInput` events on an Elm app in Safari macOS. Firefox and Chrome seem to work just fine.

The relevant code defining the input is as follows.

```
[ Html.input
    [ Html.Attributes.type_ "radio"
    , Html.Attributes.name "puzzletype"
    , Html.Attributes.checked (model.selection.puzzleType == type_)
    , Html.Attributes.value t
    , Html.Events.onInput (always <| SelectType type_)
    ]
    []
, Html.label [Html.Attributes.for t] [Html.text t]
]

```

Maybe it’s relevant that the control is within a `<details><summary></summary></details>` block?

I’m at a bit of a loss right now, also because I can’t seem to figure out how to determine event handlers in Safari developer mode. Elm does handle some other events fine.

Has anyone run into something similar before?

---

<div class="post-metadata">

**Author:** ![dmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dmy/32/702_2.png) [@dmy](https://discourse.elm-lang.org/u/dmy)\
**Post date:** [March 14, 2019, 7:18pm UTC](https://discourse.elm-lang.org/t/missing-oninput-events-in-safari/3325/2 "2019-03-14T19:18:33Z")

</div>

Shouldn’t you use [`onCheck`](https://package.elm-lang.org/packages/elm/html/latest/Html-Events#onCheck) with a radio input?

`onInput` is for text inputs.

---

<div class="post-metadata">

**Author:** ![rob](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/rob/32/589_2.png) [@rob](https://discourse.elm-lang.org/u/rob)\
**Post date:** [March 14, 2019, 7:39pm UTC](https://discourse.elm-lang.org/t/missing-oninput-events-in-safari/3325/3 "2019-03-14T19:39:59Z")

</div>

Thank you, that was it!

If anyone from the dev team is reading along, I’d suggest a mention in the docs that `onInput` isn’t meant to be used for all `<input>` tags. Bit surprising, particularly since it does work in some browsers.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [March 24, 2019, 7:40pm UTC](https://discourse.elm-lang.org/t/missing-oninput-events-in-safari/3325/4 "2019-03-24T19:40:03Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
