     else
       @cancel()
 
+  ###
+   * Focuses the hidden input, starts listening to keyboard events
+   * @private
+  ###
   setActive: ->
     @hiddenInput.focus()
 

    view.addClass "selected"
    @scrollToItemView view

  scrollToItemView: (view) ->
    scrollTop = @list.scrollTop()
    desiredTop = view.position().top + scrollTop

      @ol class: "list-group", outlet: "list"

  ###
   * Listens to events, delegates them to instance methods
   * @private
  ###
  initialize: ->
    # Core events for keyboard handling
    @on "core:move-up", (e) => @selectPreviousItemView()
    @on "core:move-down", => @selectNextItemView()
    @on "core:confirm", => @confirmSelection()
    @on "core:cancel", => @cancel()

    # List mouse events
    @list.on "mousedown", "li", (e) =>
      e.preventDefault()
      e.stopPropagation()
