         data: =>
           return @fullData
         callback: (data) =>
+          CURRENT_INDEX = -1
           @parseData data
-          @highlightRow 1
         enterCallback: =>
           if @enterCallback
-            @selectFirstRow()
+            @selectRowAtIndex 0
 
     # Event listeners
 

          # Move up
          CURRENT_INDEX -= 1 if CURRENT_INDEX > 0

        @highlightRowAtIndex(CURRENT_INDEX)

        return false

  removeArrayKeyEvent: ->
    $('body').off 'keydown'

  highlightRowAtIndex: (index, prevIndex) ->
    # Remove the class for the previously focused row
    $('.is-focused', @dropdown).removeClass 'is-focused'

    # Update the class for the row at the specific index
    selector = ".dropdown-content li:not(.divider):eq(#{index})"
    if @dropdown.find(".dropdown-toggle-page").length
      selector = ".dropdown-page-one #{selector}"

    $listItem = $(selector, @dropdown)
    $listItem.addClass "is-focused"

    # Dropdown content scroll area


      return selectedObject

  selectRowAtIndex: (index) ->
    selector = ".dropdown-content li:not(.divider):eq(#{index}) a"

    if @dropdown.find(".dropdown-toggle-page").length
      selector = ".dropdown-page-one #{selector}"

    # simulate a click on the first link
    $(selector).trigger "click"
