-
Notifications
You must be signed in to change notification settings - Fork 308
Hover state is true even if element is disabled #778
Comments
We're seeing this in our app as well. 👍 for a fix. |
👍 |
I'm programmatically disabling some components in a custom way (e.g. setting opacity when meant to be disabled), and this causes the bug as well - when disabling it in this way, it stays on the hover style until rolling over it. Would be good for a fix to address this or for there to be a nice workaround. |
This is not a radium issue but a browser issue according to mouseenter fires on disabled inputs whereas mouseleave does not. So in the case of the example provided by @braposo - where we disable then hover ( mouseEnter raised ) then leave - there is no mouseLeave event raised in the plugin. As mentioned in the react issue there is a css workaround An alternative is to fake the button ( and how it responds when disabled ) providing a data- attribute for example data-disabled and to change the resolve-interaction-styles-plugin to consider it.
resolve-interaction-styles-plugin
|
I think this was meant to be fixed with #689 (which was released in the 0.17.2 version) but it's still triggering the
:hover
state on disabled elements.Simple fiddle: https://jsfiddle.net/b8ve7ybx/4/
Just click on the check box to disable the button and hover it.
You can see that if the button is disabled the hover state is still triggered which causes the
:hover
style to be applied when the button is enabled again, even though you're not actually hovering it.I'm not sure if it's the same issue as #527 but just thought it'd be worth mentioning.
The text was updated successfully, but these errors were encountered: