-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(material/radio): hidden circle visible on some zoom levels #22066
fix(material/radio): hidden circle visible on some zoom levels #22066
Conversation
We transition the circle of a radio button to `scale(0.001)` in order to hide it and to work around an animation in IE. It seems that on higher system zoom levels (e.g. 125%+) the browser approximates the size to 1x1 which can be visible. These changes work around the issue by also setting `opacity: 0` while the circle is inactive and isn't animating. Fixes angular#22036.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// dot (see #22036). Ensure that it's hidden using `opacity`. There's a slight transition with | ||
// a long delay so that switching the opacity only applies after the `transform` is done. | ||
opacity: 0; | ||
transition: $base-transition, opacity linear 1ms $transition-duration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it have a duration and a delay, isn't just a delay good enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it just left it in as opacity linear $transition-duration
it won't delay at all and I think that some browsers won't animate it if it's 0ms.
// On some zoom levels the `scale(0.001)` from below can cause the circle to be shown as a 1x1 | ||
// dot (see #22036). Ensure that it's hidden using `opacity`. There's a slight transition with | ||
// a long delay so that switching the opacity only applies after the `transform` is done. | ||
opacity: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe JAWS + IE11 treats opacity: 0
as hidden, unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a blank span
, the input
is a sibling element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@crisbeto This breaks a handful of screenshot tests internally. I don't know if you'd be able to debug this with just these screenshots, so if not we'll need to have the next caretaker take a closer look |
We transition the circle of a radio button to `scale(0.001)` in order to hide it and to work around an animation in IE. It seems that on higher system zoom levels (e.g. 125%+) the browser approximates the size to 1x1 which can be visible. These changes work around the issue by also setting `opacity: 0` while the circle is inactive and isn't animating. Fixes #22036. (cherry picked from commit ae968ab)
angular#22066)" (angular#23152) This reverts commit ae968ab.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
We transition the circle of a radio button to
scale(0.001)
in order to hide it and to work around an animation in IE. It seems that on higher system zoom levels (e.g. 125%+) the browser approximates the size to 1x1 which can be visible.These changes work around the issue by also setting
opacity: 0
while the circle is inactive and isn't animating.Fixes #22036.