From 3ea581dae6cf2923c72235b73a2643e043000455 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 18 Oct 2021 09:28:56 +0200 Subject: [PATCH] fix(material/progress-spinner): animation not working on some zoom levels in Safari Fixes that the progress spinner animation was broken on Safari on non-default zoom levels. The problem seems to be that the `transform-origin` was being offset by the amount of zoom. These changes work around it by setting the origin based on the zoom level. Fixes #23668. --- src/material/progress-spinner/BUILD.bazel | 1 + .../progress-spinner/progress-spinner.html | 9 ++- .../progress-spinner/progress-spinner.scss | 1 - .../progress-spinner/progress-spinner.ts | 72 +++++++++++++++++-- .../material/progress-spinner.md | 20 ++++-- 5 files changed, 87 insertions(+), 16 deletions(-) diff --git a/src/material/progress-spinner/BUILD.bazel b/src/material/progress-spinner/BUILD.bazel index c1535578c6e0..2de0e6ce53c4 100644 --- a/src/material/progress-spinner/BUILD.bazel +++ b/src/material/progress-spinner/BUILD.bazel @@ -22,6 +22,7 @@ ng_module( deps = [ "//src/cdk/coercion", "//src/cdk/platform", + "//src/cdk/scrolling", "//src/material/core", "@npm//@angular/animations", "@npm//@angular/common", diff --git a/src/material/progress-spinner/progress-spinner.html b/src/material/progress-spinner/progress-spinner.html index 29c093050abd..9156f5d44a4c 100644 --- a/src/material/progress-spinner/progress-spinner.html +++ b/src/material/progress-spinner/progress-spinner.html @@ -14,7 +14,8 @@ preserveAspectRatio="xMidYMid meet" focusable="false" [ngSwitch]="mode === 'indeterminate'" - aria-hidden="true"> + aria-hidden="true" + #svg>