Anchor is ignored when reloading a page in Chrome

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: 16
    • Component/s: tools

      With JDK-8249133 we fixed the problem of the back/forward buttons not working with anchor links, but it seems we introduced a new problem specific to the Chrome browser. When reloading a URL that contains an anchor in Chrome, the scroll position is set to the top of the page, ignoring the anchor. Note that this only happens when reloading a page with an anchor link, not when clicking the anchor link in the first place.

      It seems like the problem is caused by Chrome using a different sequence of firing the popstate event during page load. The solution is likely to avoid setting the scroll state during page load when the current page URL contains an anchor.

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: