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

avoid 2 separate au requests for onBookmarkChange onHistoryPopState

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: Freshly, 8.5.0
    • Fix Version/s: 8.5.0
    • Component/s: ZK Client Engine
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      click either of the links:

      <zk>
      	<a href="#bookmark1" label="goto bookmark1"/>
      	<a href="#bookmark2" label="goto bookmark2"/>
      </zk>
      

      Current Result

      most of the time 2 separate AuRequests / WsMessages are sent to the server

      1. onHistoryPopState (immediately)
      2. onBookmarkChange (after a delay <250ms)

      Expected Result

      both events should be sent at in a single request / ws message

      Root Cause

      onBookmarkChange relies on a fixed interval of 250ms

      The check if the bookmark has changed can be triggered immediately during the event handling for onHistoryPopState to avoiding the delay and double request.

      This requires exposing and calling the checkBookmark function.

      Alternative is firing a client side event and listen to it from bookmark.js.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rudyhuang rudyhuang
                Reporter:
                cor3000 cor3000
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h