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.

Checkbox and RadioButton do not respond to state change of disabled attribute in MS Edge

See original GitHub issue

Checkbox and RadioButton do not respond to disabled state change in MS Edge. State change works fine for the vanilla checkbox.

CodeSandbox repro here: https://codesandbox.io/s/wk215jw068

Detailed description

Describe in detail the issue you’re having.

In MS Edge, when you have something like <Checkbox disabled={this.state.disabled} id="2" labelText="Carbon Checkbox" />, changing the disabled state does not update the style in the UI.

Is this a feature request (new component, new icon), a bug, or a general issue?

Bug

Is this issue related to a specific component?

Yes

What did you expect to happen? What happened instead? What would you like to see changed?

I expected that, when you do setState({ disabled: true }) that the cursor style would switch to disabled and the text would be grayed out.

Instead, the styles do not change immediately when setState() is called.

I would like the styles to change immediately when setState() is called.

What browser are you working in?

Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134

What version of the Carbon Design System are you using?

carbon-components 9.1.1 carbon-components-react 6.6.3 carbon-icons 7.0.7 react 16.3.2 react-dom 16.3.2

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

Not really. We ship June 25 but this is not a priority for our release.

Steps to reproduce the issue

CodeSandbox repro here: https://codesandbox.io/s/wk215jw068

Here is a gif: ezgif-3-77773e76f0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
shinytoyrobotscommented, Dec 5, 2018

I’m fine to reopen this, and I think it probably makes more sense to move to carbon-components given that it is primarily a CSS issue rather than React specific.

The point about browser issues/differences is a fair one. From a core Carbon contribution team, this might not be a current priority. But I think it’s perfectly reasonable to leave this open for collaborative solutions and potential fixes by the community.

1reaction
ollie-ocommented, Jul 3, 2018

No worries at all. As long as it’s on the backlog somewhere, I’m happy. Thanks for all the great work on this library!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disabled button is clickable on Edge browser - Stack Overflow
Show activity on this post. This is a bug in Microsoft Edge. Disabled buttons accept clicks if they contain any HTML elements (i.e....
Read more >
Guidelines for radio buttons - Windows apps | Microsoft Learn
In the default state, no radio button in a RadioButtons group is selected. That is, all radio buttons are cleared. However, once a...
Read more >
Standardizing the checkbox and radio buttons using CSS (and ...
Learn how to standardize the checkbox and radio buttons using CSS.
Read more >
HTML attribute: disabled - HTML: HyperText Markup Language
If the disabled attribute is specified on a form control, the element and its form control descendants do not participate in constraint ...
Read more >
HTML 5.2: 4.10. Forms - W3C
To make the radio buttons work as a group, they are given a common name using the ... When an input element is...
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