phoenix_live_view
phoenix_live_view copied to clipboard
Disabled `phx-click` targets with children should not fire click events.
If we define a phx-click event on an element with no children and set disabled on that element, phx-click will not fire. However, if that element has children, this is not the case.
Compare:
<button disabled phx-click="increment">+ 1</button>
to
<button disabled phx-click="toggle">
<span class="material-icon">add</span>
</button>
In the first example, the event will not fire. In the second one, the event will fire. This doesn't adhere to standard HTML behavior.
I've tested this on <button> elements, but I imagine the behavior is fairly general.