Open vovakulikov opened 3 years ago
Thanks for the report @vovakulikov 🙏 Not sure what an ideal fix is for that, open to suggestions/thoughts!
The bug was fixed in Firefox v126, but the misaligned tooltips / brushes are still a problem when they are used inside a translated svg
element. See this example, where I shifted the brush 100 pixels to the right. In Chrome, it works as expected, in Firefox it seems to take the outermost svg
element as reference.
Hi there.
It seems like in Firefox
svg.screenCTM()
result is a bit different compared to other browsers (Safari, Chrome). More about this here https://bugzilla.mozilla.org/show_bug.cgi?id=1610093Since
@visx/event
uses this API to calculate svg point position https://github.com/airbnb/visx/blob/d5fb82e42af56da4ee325ac5d2028fde52a48b01/packages/visx-event/src/localPointGeneric.ts#L12-L25This all leads us to the case when we translate our chart we get a bad tooltip and cursor line position.