Skip to content

Commit 643b1e9

Browse files
committed
fix(wokwi-potentiometer): unusable in Firefox 143.0
wokwi/wokwi-features#1043
1 parent 8860de4 commit 643b1e9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/utils/ctm-workaround.ts

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

1411
if (workaroundNeeded) {
15-
// Firefox's getScreenCTM() is broken: https://bugzilla.mozilla.org/show_bug.cgi?id=1610093
12+
// In some browsers, getScreenCTM() is broken.
13+
// It happened on FireFox, but they have fixed the issue since: https://bugzilla.mozilla.org/show_bug.cgi?id=1610093
1614
const targetCTM = target.getCTM();
1715
const workaroundCTM = workaroundElement?.getCTM();
1816
const boundingRect = workaroundElement?.getBoundingClientRect();

0 commit comments

Comments
 (0)