Does the hash navigation on iPhone works properly?

2019-08-14 22:32发布

问题:

Does the hash navigation on iPhone works properly?

There is a page http://example.com/somepage, on this page there is an element which has <a href='#someIdOnPage'>. When user clicks on this element, the page scrolls down to the element having this id in the DOM and the URL in the browser is updated to http://example.com/somepage#someIdOnPage.

This is working fine on android browsers, but it breaks on apple safari. When I click on this element it doesn't scroll down to the id element. But when I load the URL http://example.com/somepage#someIdOnPage directly, it correctly scrolls down to the corresponding element.
Am I missing something here?