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

ZK animation uses "complete" callback. should use always instead

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.6.1
    • Fix Version/s: 8.6.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S1, ZK 8.6.2 S2

      Description

      Debug Info

      https://github.com/zkoss/zk/blob/4efeeef5c4671a42e563e05a31d1797a75b10e01/zk/src/archive/web/js/zk/anima.js#L199-L203

      animate() calls that use a complete:callback as part of the option list will trigger the callback if the animation completes successfully.
      If the animation ends without completing for any reason (browser handling, property error, interupted, etc), the complete:callback will not be invoked, which prevents the animated component from triggering afterAnima (or any other relevant post-animation logic).

      Root Cause

      Solution

      JQ animate supports the always:callback in addition to complete:callback
      always will always be trigger when the animation finishes, regardless of state. (It acts as a "finally" block)
      As such, it should be prefered for callbacks that needs to be invoked at the end of the animation.

        Attachments

          Activity

            People

            • Assignee:
              Leon03 Leon03
              Reporter:
              MDuchemin MDuchemin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 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