     @config.selectors ?= []
 
     chrome.runtime.sendMessage name: "icon", show: true if @config.selectors?
-    if element
+    if element and Common.isInViewport(element) and Common.isDisplayed element
       @selectElement element, false
     else if element = @getElements("down")[0]
-       @selectElement element, false
+      if Common.isInViewport element
+        @selectElement element, false
 
   deactivate: ->
     chrome.runtime.sendMessage name: "icon", show: false

  # If we scroll, and there's already a selected element, and that element goes out of the viewport, then we
  # select the top-most visible selectable element.
  onScroll: do ->
    delay = 50
    timer = null
    previousPageYOffset = pageYOffset

    cancel = ->
      if timer
        clearTimeout timer; timer = null

    (event, clear = false) ->
      # Figure out the direction of the last scroll.  If we're at or close to the top of the window, then we

      unless clear
        timer = Common.setTimeout delay, =>
          timer = null
          if @element
            unless Common.isInViewport(@element) and Common.isDisplayed @element
              @clearSelection()
          unless @element
            if element = (ele for ele in @getElements direction when Common.isInViewport ele)[0]
              @selectElement element, false

