History API in Safary | issue accessing a link with anchor

14 Views Asked by At

I'm using History API pushState in order to change the url when navigating through different sections with anchors. The problem is that it gets confused some time when you go back through the page it was called from and try to access a the page with the anchors with different anchor. Seems to be History API problem, because when I stop calling the pushState the problem disapears, but can't find another way to sincronize the url with the section active in the viewport without refreshing the page.

adding '/' before the anchor is not an option because it changes analytics data

0

There are 0 best solutions below