petalframework / petal_components

Phoenix + Live View HEEX Components
https://petal.build/components
MIT License
768 stars 84 forks source link

Wrong cursor on disabled link #260

Closed TillRauch closed 9 months ago

TillRauch commented 10 months ago

When hovering over a disabled button the cursor correctly shows as not-allowed. However, when hovering over a disabled button that has link_type="a" set, the cursor instead shows as pointer.

This can also be replicated in a plain petal-boilerplate environment: grafik

mplatts commented 9 months ago

Thanks - <a> tags oddly don't have a native ability to be disabled.

Looks like we'll have to add the Tailwind equivalent of the CSS:

a.disabled {
  pointer-events: none;
  cursor: default;
}

And also add tabindex="-1" on the element itself.

mplatts commented 9 months ago

Should be fixed in 1.6.0