Skip to content

Commit 93e4bcb

Browse files
committed
fix(slide-potentiometer): not functional in Safari
wokwi/wokwi-features#818
1 parent 0157d17 commit 93e4bcb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/ctm-workaround.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export function getScreenCTM(
66
workaroundRect: DOMRectReadOnly
77
) {
88
const { userAgent } = navigator;
9-
const workaroundNeeded = userAgent.indexOf('Firefox') >= 0 || userAgent.indexOf('Epiphany') >= 0;
9+
const workaroundNeeded =
10+
userAgent.indexOf('Firefox') >= 0 ||
11+
userAgent.indexOf('Epiphany') >= 0 ||
12+
userAgent.indexOf('Safari') >= 0;
1013

1114
if (workaroundNeeded) {
1215
// Firefox's getScreenCTM() is broken: https://bugzilla.mozilla.org/show_bug.cgi?id=1610093

0 commit comments

Comments
 (0)