I have an app using d3 zoom that works in Chrome but not (for me) in Firefox. I've boiled the zoom issue down to the following very simple example:
https://codesandbox.io/s/d3-zoom-error-in-firefox-mzid3
import { zoom } from "d3-zoom";
import { select } from "d3";
select("svg").call(
zoom().on("zoom", (event) => {
console.log(`Transform: ${event.transform.toString()}`);
select("g").attr("transform", event.transform.toString());
})
);
Wheel zooming on the gray square works for me in Firefox in Code Sandbox's default split view, but when I open the browser preview in a new tab and try it, the console logs transform values of "translate(NaN,NaN) scale(NaN)". I'm sure I'm missing something obvious.
Turns out this was caused by an extension I had installed: https://addons.mozilla.org/en-US/firefox/addon/logitechsmoothscrolling/. Georgy's note that the demo worked for them caused me to look more closely at my particular Firefox profile. As that extension is 4 years old, and scrolling seems pretty smooth without it, I'm satisfied with removing the extension.