Skip to content

Commit 0bc20e8

Browse files
committed
fix(potentiometer): broken in Epiphany browser
see #130
1 parent 7d963ee commit 0bc20e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/potentiometer-element.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ export class PotentiometerElement extends LitElement {
195195
const knob = this.shadowRoot?.querySelector<SVGRectElement>('#knob');
196196
this.pageToKnobMatrix = knob?.getScreenCTM()?.inverse() ?? null;
197197

198-
if (navigator.userAgent.indexOf('Firefox') >= 0) {
198+
const { userAgent } = navigator;
199+
200+
if (userAgent.indexOf('Firefox') >= 0 || userAgent.indexOf('Epiphany') >= 0) {
199201
// Firefox's getScreenCTM() is broken: https://bugzilla.mozilla.org/show_bug.cgi?id=1610093
200202
const firefoxWorkaround =
201203
this.shadowRoot?.querySelector<SVGRectElement>('#firefox-workaround');

0 commit comments

Comments
 (0)