     totalElapsed = 0.0
     calibration = 1.0
     previousTimestamp = null
+    cancelEventListener = @installCanceEventListener()
 
     animate = (timestamp) =>
       previousTimestamp ?= timestamp

CoreScroller =
  init: ->
    @time = 0
    @lastEvent = @keyIsDown = @cancelEventListenerId = null

  # This installs listeners for events which should cancel smooth scrolling.
  installCanceEventListener: ->
    @removeCancelEventListener()
    # NOTE(smblott) With extreme keyboard configurations, Chrome sometimes does not get a keyup event for
    # every keydown, in which case tapping "j" scrolls indefinitely.  This appears to be a Chrome/OS/XOrg bug
    # of some kind.  See #1549.
    @cancelEventListenerId = handlerStack.push
      _name: 'scroller/track-key-status'
      keydown: (event) =>
        handlerStack.alwaysContinueBubbling =>

        requestAnimationFrame animate
      else
        # We're done.
        handlerStack.remove cancelEventListener
        checkVisibility element

    # If we've been asked not to be continuous, then we advance time, so the myKeyIsStillDown test always
