I have a few buttons that are enabled or disabled based on state (passed down as prop, but that doesn't seem relevant).
Once they have been clicked they retain the mdc-ripple-upgraded--background-focused class even if other buttons are clicked. The button can be enabled / disabled, but it is always "focused" when it is re-enabled.
This behaviour does not occur if the disabled property is not set, or is set by a static var.
Can you make a quick repro in the code sandbox? The description is hard to follow.
Apologies, didn't have time to work this up earlier: https://codesandbox.io/s/rmwc-sandbox-6f16d
Can't attest this is a RMWC issue, though things behaved as expected with MDC React
Yeah thats really strange. Actively working on the next release so I'll make sure to get this in.
Blur isn't called when the state is changed to disabled, so the class is not removed by the foundation. Here is the fix in MDC React: material-components/material-components-web-react#943
Thanks for finding that, Will get fixed in the next release!
Fixin in 6.0.0.
Most helpful comment
Fixin in 6.0.0.