Hi and thanks for mdl!
If I add disabled to a <button> and for this button a tooltip. The tooltip stops working. Removing the disabled and it's working as it should.
Bug?
Makes logical sense. If something is disabled it therefore shouldn't trigger any UX other than disabled indicators.
This isn't exactly straightforward though, seems like a UX quirk that can go either way depending on what is being done.
Yeah it does make sense. I can work around it by using a div or something else. I just want to let the user know why the button got disabled.
But if this is not a mdl bug then feel free to close it. No reason to put extra code into mdl.
I think some context here may help. Could you provide a quick codepen with a minimized UX you are dealing with?
Say in the case of standard forms, normal input validation should provide that feedback. But, your UX may have something special in it where that isn't viable. In which case we may want to look at handling this internally somehow.
It might be better if I describe the use-case, since I'm not sure how a minimal example could look.
IMO that situation is best handled by better UX internally. For example a custom "reset categories" button that resets only the categories and not the entire form. This way the disabled state is actually necessary for the entire form since you are trying to prevent data loss, but the categories on their own have their own reset functionality.
Maybe I wasnt clear: That's what I currently have. Though the inputs depend on the selected category. The existing inputs make no sense anymore should the category change. I'll provide a "reset objects" button that requires a two-click (with confirmation) button to actually throw them away below the form. But I don't want users to think they can change the category after they've input some (can be hundreds) object definitions.
We'll try to make sure this works when building V2 components. If someone wants to look into doing this for 1.x then they are free to do so on their own.
Another potential bug to lookout for: I have button that deletes an object, and has a tooltip. It's disabled if the object is deleted (on the server). Having React switch the button to disabled causes the tooltip to stay up forever and never disappear.
Another use-case:
Another use-case:
So in those cases, the tooltip always appears because you have to click the button, and never dissapears after the button being disabled
Most helpful comment
Another potential bug to lookout for: I have button that deletes an object, and has a tooltip. It's disabled if the object is deleted (on the server). Having React switch the button to
disabledcauses the tooltip to stay up forever and never disappear.