     axisName = scrollProperties[direction].axisName
 
     unless settings.get "smoothScroll"
-      return performScroll element, axisName, amount
+      # Jump scrolling.
+      performScroll element, axisName, amount
+      checkVisibility element
+      return
 
     if mostRecentActivationTime == time or lastEvent?.repeat
       # Either the most-recently activated animator has not yet received its keyup event (so it's still
-      # scrolling), or this is a keyboard repeat (for which we don't initiate a new animator).  We need both
-      # of these checks because sometimes (perhaps one time in twenty) the last keyboard repeat arrives
-      # *after* the corresponding keyup.
+      # scrolling), or this is a keyboard repeat (for which we don't initiate a new animator).
+      # NOTE(smblott) We need both of these checks because sometimes (perhaps one time in twenty) the last
+      # keyboard repeat arrives *after* the corresponding keyup.
       return
 
     mostRecentActivationTime = activationTime = ++time

  else
    amount

# Test whether element should be scrolled.
shouldScroll = (element, direction) ->
  computedStyle = window.getComputedStyle(element)

      element = element.parentElement || document.body
  element

checkVisibility = (element) ->
  # if the activated element has been scrolled completely offscreen, subsequent changes in its scroll
  # position will not provide any more visual feedback to the user. therefore we deactivate it so that
  # subsequent scrolls only move the parent element.
  rect = activatedElement.getBoundingClientRect()
  if (rect.bottom < 0 || rect.top > window.innerHeight || rect.right < 0 || rect.left > window.innerWidth)
    activatedElement = element

# How scrolling is handled:
#   - For non-smooth scrolling, the entire scroll happens immediately.
