Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
pointer-events styles breaks title prop and cursor styles on disabled buttons #276
I think it's a dangerous precedent to rely on
So without a dedicated
Steps to Reproduce
<button class="button is-disabled" title="Cannot remove the last item" disabled type="button"> Remove </button> <!-- Or wrapped in a control --> <div class="control is-disabled" title="Cannot remove the last set"> <button class="button" disabled type="button"> Remove </button> </div>
Expected behavior: When hovered over, the browser toggles the
Actual behavior: Both the tooltip and cursor style are not activated.
However, you have changed examples to use the attribute on anchors.
This seems to be invalid (anyone, please correct me if I'm wrong).
I am under the impression that in order to style anchors as "disabled", the re-introduction of a corresponding CSS class is necessary.
The issue I raised technically only applied to form controls (buttons and inputs), I'm not quite sure why that change was also done for anchor tags.
@homeworkprod But even if a CSS class (or something like
Is this getting reverted back specifically on the tags? disabled doesn't appear to be considered as a valid attribute for anchors. It does appear that if disabled gets hard coded to an anchor directly when defining that, yes the element seems to show in a "disabled" state but subsequently it isn't able to be programmatically enabled / disabled beyond its original definition which means you are stuck with having to specifically define 2 separate anchors (specifically one enabled and one disabled) and then perform some type of show/hide toggle between them which is very sub-optimal. Or is there something I'm missing?
This is a two edged sword. By not relying on a class, you cannot click things inside the disabled element. For example we have an input box that is disabled, but when clicking the little lock which is INSIDE the input box, we want to enable it.
Cannot do that if disabled is a property of the input box, as the browser blocks onclick events.