Hacker News new | ask | show | jobs
by Ciantic 1680 days ago
> CSS includes a handy pointer-events attribute that makes buttons and links flip to non-interactive

Except that it doesn't, you can still focus those with keyboard and click them. You should always disable buttons with `disabled` property instead of that hack.

1 comments

In this case, the rule is for all interactive elements. It's not just buttons, but anchor tags as well (or any other element a user decides to put a `phx-click` and friends on. Phoenix LiveView internally already noops if it's not connected, but we used the css rule so the cursor pointer would not reflect an interactive element while in a loading state.