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

avoid 2 separate au requests for onBookmarkChange onHistoryPopState

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.0
    • Freshly, 8.5.0
    • ZK Client Engine
    • Security Level: Jimmy
    • None

      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.

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

              Created:
              Updated:
              Resolved:

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