From bdf8c4e66931030263d8e36fb9cde66a304b66ea Mon Sep 17 00:00:00 2001 From: ErikOnBike Date: Fri, 16 Sep 2022 21:14:38 +0200 Subject: [PATCH] Fix workaround for Safari which still has old property name in sl-progress-ring (#914) --- src/components/progress-ring/progress-ring.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/progress-ring/progress-ring.ts b/src/components/progress-ring/progress-ring.ts index de4c1a9f4..51281009a 100644 --- a/src/components/progress-ring/progress-ring.ts +++ b/src/components/progress-ring/progress-ring.ts @@ -43,7 +43,7 @@ export default class SlProgressRing extends ShoelaceElement { // change, possibly because of a mix of pixel + unit-less values in the calc() function. It seems like a Safari bug, // but I couldn't pinpoint it so this works around the problem. // - if (changedProps.has('percentage')) { + if (changedProps.has('value')) { const radius = parseFloat(getComputedStyle(this.indicator).getPropertyValue('r')); const circumference = 2 * Math.PI * radius; const offset = circumference - (this.value / 100) * circumference;