question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button disabled gets twice class Mui-disabled

See original GitHub issue

When a Button is disabled, it gets twice the class Mui-disabled.

unknown-20

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

There are two Mui-disabled class on a disabled Button.

Expected Behavior 🤔

Only one Mui-disabled class on a disabled Button.

Steps to Reproduce 🕹

https://material-ui.com/components/buttons/ Or: https://codesandbox.io/s/material-demo-mtk0k

Steps:

  1. Inspect the disabled Button

Context 🔦

Doesn’t affect behavior.

Your Environment 🌎

Tech Version
Material-UI v4.9.2
React v16.12.0
Browser Version 78.0.3904.87 (Official Build) (64-bit)
TypeScript 3.9.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
xenostarcommented, Apr 6, 2020

Is there a reason this closed? This clearly isn’t the intended behavior. There shouldn’t be two .Mui-disabled classes appended to a DOM node if there is only one disabled prop on the component. It seems to be a real bug and not-intended behavior. @eps1lon Can we re-open?

0reactions
pmendelsoncommented, Apr 1, 2021

I don’t have an opinion about whether the Mui-disabled class is or isn’t a good ideal to direct the styling but many html checkers frown on seeing the same classname multiple times in the same class attribute

Read more comments on GitHub >

github_iconTop Results From Across the Web

Button disabled gets twice class Mui-disabled #19683 - GitHub
When a Button is disabled, it gets twice the class Mui-disabled . unknown-20. The issue is present in the latest release.
Read more >
Override .Mui-disabled (or other pseudo-classes/states) from ...
Mui-disabled class rules once. Basically I don't want all disabled items to have the default grey colored background.
Read more >
Making Disabled Buttons More Inclusive - CSS-Tricks
Let's talk about disabled buttons. Specifically, let's get into why we use them and how we can do better than the traditional disabled...
Read more >
disable twice pressing of submit button - MSDN
How do i make out the submit button has been pressed twice or how do i stop that ... Try the below Sample...
Read more >
Xpath doubt - General Web Dev - SitePoint Forums
I am new to XPATH Supratik's Kitchen Switch to mobile view . where i ... <button class="MuiButtonBase-root MuiButton-root ... Mui-disabled ].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found