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

fix(slider): thumb disappearing on disabled element with thumb label #6641

Merged
merged 1 commit into from
Sep 1, 2017

Conversation

crisbeto
Copy link
Member

Fixes the slider thumb becoming hidden when a disabled slider with a thumb label is focused.

Fixes #6631.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 25, 2017
@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Aug 28, 2017
@@ -214,7 +214,7 @@ $mat-slider-focus-ring-size: 30px !default;


// Active slider.
.cdk-focused {
.mat-slider.cdk-focused:not(.mat-slider-disabled) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this adds a lot off specificity, are you sure it doesn't break any of the other states?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice anything from poking around the demo. I can reduce the specificity slightly by changing the selector to .cdk-focused:not(.mat-slider-disabled).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its good to leave the .mat-slider so it doesn't wind up triggering when inside of another focused element, just curious if you had checked for other cases because I know I've had CSS regressions in the past with slider when I try to do these kind of changes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One place I could see it potentially breaking is the mouse, keyboard etc. focused styles a bit below. I can scope those to .mat-slider:not(.mat-slider-disabled) as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked as discussed @mmalerba.

Fixes the slider thumb becoming hidden when a disabled slider with a thumb label is focused.

Fixes angular#6631.
@crisbeto crisbeto force-pushed the 6631/disabled-slider-thumb-label branch from dbced21 to cd30d8d Compare August 30, 2017 17:12
@mmalerba
Copy link
Contributor

LGTM styles still seem to work

crisbeto added a commit to crisbeto/material2 that referenced this pull request Aug 30, 2017
Fixes the slider not updating if its direction is changed dynamically. This is something I came across while testing angular#6641.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Aug 30, 2017
Fixes the slider not updating if its direction is changed dynamically. This is something I came across while testing angular#6641.
@jelbourn jelbourn merged commit 8243b16 into angular:master Sep 1, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

slider thumb disappearing on click
4 participants