tabatkins / css-toggle

Proposal for a CSS Toggle spec
Creative Commons Zero v1.0 Universal
28 stars 1 forks source link

should togglechange events fire when toggles don't actually change? #35

Closed dbaron closed 2 years ago

dbaron commented 2 years ago

The specification currently says that togglechange events fire whenever the fire a toggle activation steps are run, even if the toggle doesn't actually change (for example, if toggle-trigger: toggle set <v> sets it to the current value, or if it is sticky and already at its maximum value).

This feels odd to me, although I haven't thought about the use cases. Should "togglechange" fire only when the toggle actually changes, or should it fire whenever the activation steps run even if there is no change?

tabatkins commented 2 years ago

Hm, I suspect I agree that it should only fire when the value changes.