     scrolledAmount = 0
 
     shouldStopScrolling = (progress) ->
-      # If activationId == time, then this is the most recently-activated animator and we haven't yet seen its
-      # keyup event, so keep going.
-      if activationId == time then false else duration <= progress
+      # If activationTime == time, then this is the most recently-activated animator and we haven't yet seen
+      # its keyup event, so keep going; otherwise, check progress and duration.
+      if activationTime == time then false else duration <= progress
 
     animate = (timestamp) ->
       start ?= timestamp

      scrollDelta = roundOut(delta * progress) - scrolledAmount
      scrolledAmount += scrollDelta

      if performScroll(element, axisName, scrollDelta, false) != scrollDelta or shouldStopScrolling progress
          # One final call of performScroll to check the visibility of the activated element.
          performScroll(element, axisName, 0, true)
          window.cancelAnimationFrame(animatorId)

  # Elements with `overflow: hidden` should not be scrolled.
  return false if computedStyle.getPropertyValue("overflow-#{direction}") == "hidden"
  # Non-visible elements should not be scrolled.
  return false if computedStyle.getPropertyValue("visibility") in ["hidden", "collapse"]
  return false if computedStyle.getPropertyValue("display") == "none"
  true

