From 93e4bcbc68212bc76d46da32c9a7281c936dcceb Mon Sep 17 00:00:00 2001 From: Ariella Eliassaf Date: Wed, 12 Feb 2025 19:25:51 +0200 Subject: [PATCH] fix(slide-potentiometer): not functional in Safari wokwi/wokwi-features#818 --- src/utils/ctm-workaround.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/ctm-workaround.ts b/src/utils/ctm-workaround.ts index 9836559..4aa55d2 100644 --- a/src/utils/ctm-workaround.ts +++ b/src/utils/ctm-workaround.ts @@ -6,7 +6,10 @@ export function getScreenCTM( workaroundRect: DOMRectReadOnly ) { const { userAgent } = navigator; - const workaroundNeeded = userAgent.indexOf('Firefox') >= 0 || userAgent.indexOf('Epiphany') >= 0; + const workaroundNeeded = + userAgent.indexOf('Firefox') >= 0 || + userAgent.indexOf('Epiphany') >= 0 || + userAgent.indexOf('Safari') >= 0; if (workaroundNeeded) { // Firefox's getScreenCTM() is broken: https://bugzilla.mozilla.org/show_bug.cgi?id=1610093