Missing onInput events in Safari

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?

1 Like

Shouldn’t you use onCheck with a radio input?

onInput is for text inputs.


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.

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