       mouseEnter: ->
         options = @get('filteredOptions')
         hoveredOption = @get('context')
-
-        for option, index in options
-          if option == hoveredOption
-            @set 'highlightedIndex', index
-            break
+        @set 'highlightedIndex', options.indexOf(hoveredOption)
 
 
 poplist.reopenClass

      @set('listHeight', (optionCount * rowHeight))
    else
      @set('listHeight', (10 * rowHeight))


  # Keyboard controls

    # Focus on search after poplist is positioned or the page may scroll
    Ember.run.next this, -> @focusOnSearch()

    # Ensure the selected option is visible
    Ember.run.next this, -> @scrollToSelection @get('selection')

  # Focus on search input when poplist shows so we can catch key input
  focusOnSearch: ->
    @$().find('input:first').focus()
