Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4407

Unexpected scrollRestoration when chrome loading the page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: Freshly, 9.0.0
    • Fix Version/s: 9.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      chrome,safari

      Description

      Steps to Reproduce

      load F90-ZK-4382.zul

      Current Result

      not scrolling to the target1 button after loading the page

      Expected Result

      target1 and the coachmark scroll into view

      Debug Information

      https://bugs.chromium.org/p/chromium/issues/detail?id=515257

      chrome restore the history scroll position after coachmark scroll into view when the first time loading(refresh/back/forward). 

      ref: https://stackoverflow.com/questions/10742422/prevent-browser-scroll-on-html5-history-popstate

      Workaround

      https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration

      <script>
      if ('scrollRestoration' in history)

      { history.scrollRestoration = 'manual'; }

      </script>

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Time Spent - 3 hours Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - 3 hours Remaining Estimate - 1 hour
                  3h