unabridged / motion

Reactive frontend UI components for Rails in pure Ruby
https://github.com/unabridged/motion
MIT License
697 stars 19 forks source link

Don't `preventDefault` when the component is not connected #23

Closed alecdotninja closed 4 years ago

alecdotninja commented 4 years ago

This fixes a few minor issues I noticed while reviewing the client code (and trying to motivate myself to write more unit tests). The only behaviour change is that now motions that are marked as handle won't preventDefault if the component is not connected.

This is important because it allows a form with a submit Motion to fallback to a regular request.