scrollIntoView is not working as expected in safari browser

Viewed 10162

I have this scrollable div and inside i have an SVG with points that has id's given. i want to align the selected point to the centre of the div and i have this solution

document.getElementById("myID").scrollIntoView({ 
    behavior: 'smooth', 
    block: 'nearest', 
    inline: 'center' 
 })

this works fine in chrome but in safari it's not working, what is the best solution ?

1 Answers
Related