I know this is for the new api, but I want to mention a bug I fixed here with safari.
So, the way the debois/elm-dom implements the approximation for boundingClientRect uses some offset values from the dom node. In Chrome/Firefox everything works fine because those values are not present on the rect/path/g/svg nodes causing the decoder to fail then making the lookup go to its parent.
However, safari, instead of not defining those values, uses a 0 valued property, messing with all hint calculations.
The way I solved it was "skipping" everything that lies on SVG namespace. Like this:
I know this is for the new api, but I want to mention a bug I fixed here with safari. So, the way the debois/elm-dom implements the approximation for boundingClientRect uses some offset values from the dom node. In Chrome/Firefox everything works fine because those values are not present on the rect/path/g/svg nodes causing the decoder to fail then making the lookup go to its parent.
However, safari, instead of not defining those values, uses a 0 valued property, messing with all hint calculations.
The way I solved it was "skipping" everything that lies on SVG namespace. Like this:
I implemented this in our fork at https://github.com/Bractlet/elm-plot/tree/1.0.0
What do you guys think?