phoenixframework / phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
https://hex.pm/packages/phoenix_live_view
MIT License
5.99k stars 902 forks source link

Throw error when dispatching input on invalid targets #3331

Open SteffenDE opened 5 days ago

SteffenDE commented 5 days ago

Using JS.dispatch to trigger an input event only works when targeting an input element (input, select, textarea), not the form element itself. This commit throws a useful error in the case of an invalid target.

References #3328