-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Slider] Value label position if disabled #19329
Comments
I have no idea. I suspect it originates from iteration on the initial implementation. |
Sorry to reopen this issue but this problem is back. On a disabled slider the value label is again positioned slightly to the right. See a code sandbox here. The same steps as above reproduce the problem:
This time I think the problem is at this line. The value label is being centered by a manual calculation of If interested I could try to put together a PR to fix the issue. It would probably involve applying the disabled pseudo-class to the value label element in addition to the root and thumb and styling accordingly. |
@davidfdriscoll Thanks for the report. I think that we should remove the IE 11 fix, in the source and in the customization demos and add a visual regression test. This is mainly motivated by https://next.material-ui.com/getting-started/supported-platforms/#ie-11. |
That sounds good -- would you mind if I try tackling that and submit a pull request to remove the IE 11 fix and add a test? |
@davidfdriscoll Please do :) |
If the
Slider
isdisabled
, the value label is slightly off to the right.Current Behavior 😯
The value label for a disabled Slider is positioned slightly to the right.
The problem is at this line: https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Slider/ValueLabel.js#L23
Removing the line fixed the problem, can you explain why it is needed?
Expected Behavior 🤔
The value label should be centered.
Steps to Reproduce 🕹
https://codesandbox.io/s/material-demo-edpse
Steps:
valueLabelDisplay="on"
to make the value label visible all the timedisabled={true}
Context 🔦
I want to display the value of a disabled slider.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: