Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE11: switch thumb disappears #16812

Closed
dj1703 opened this issue Jul 30, 2019 · 8 comments · Fixed by #17095
Closed

IE11: switch thumb disappears #16812

dj1703 opened this issue Jul 30, 2019 · 8 comments · Fixed by #17095
Labels
bug 🐛 Something doesn't work component: switch This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@dj1703
Copy link

dj1703 commented Jul 30, 2019

The thumbs of switches disappear on the IE11 if the switch is checked. It seems to be moved outside of the track (see screenshot). If the switch is unchecked the thumb appears again and looks fine.
grafik

Expected Behavior 🤔

Thumb doesn't disappear if switch is checked.

Current Behavior 😯

Thumb disappears if a switch is checked. It appears again if the switch is not checked anymore.

Steps to Reproduce 🕹

Reproducible with the switches on the demo page: https://material-ui.com/components/switches

  1. Checked switches have no thumb.
  2. Unchecked switches show the thumb.

Your Environment 🌎

Tech Version
Material-UI 4.3.0
React 16.8.6
IE 11.615.17763.0
TypeScript 3.4.5
@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 30, 2019

This is a regression of #16620. setting display: block fixes the static output but doesn't solve the animation jump.

@darkowic What do you think of going back to the hardcoded transition value as long as we support IE 11: #14420?

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: switch This is the name of the generic UI component, not the React module! labels Jul 30, 2019
@darkowic
Copy link
Contributor

darkowic commented Jul 31, 2019

Oh no IE...

Mui-checked {
  left: auto;
  right: 0px;
}

It works (the position is correct) but I do not know if it is possible to animate it (Any CSS master here? 😂 ).

I see also that the label from IconButton is gone - not displayed at all. But when I change display to inline-block it is back (still placed incorrectly).

But maybe rolling back the hardcoded translate will be fine... I do not like it but I broke it so let's keep the old solution...

@oliviertassinari
Copy link
Member

OK great, thanks for checking. Let's use the hardcoded translate :).

@oliviertassinari oliviertassinari added help appreciated good first issue Great for first contributions. Enable to learn the contribution process. and removed help appreciated labels Jul 31, 2019
@boukensj
Copy link

boukensj commented Aug 9, 2019

I solved it by giving the switch style a width of 90

@oliviertassinari
Copy link
Member

@boukensj How does it look like?

@boukensj
Copy link

boukensj commented Aug 9, 2019

Screenshot 2019-08-09 16 46 28

Screenshot 2019-08-09 16 46 17

@oliviertassinari
Copy link
Member

@boukensj Thanks for sharing. I think that the hardcoded transition value is still our best option: #16812 (comment).

@oliviertassinari
Copy link
Member

The same problem was reported on Safari, we need to revert the transfrom 100%: #17029.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: switch This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants