             if search.length > 0
               @_openMenu search
             else
-              @dropDownMenu.hide()
+              @_closeMenu()
           , 500)
         @lastSearch = search
       else if @dropDownMenu.is(":visible")
         selected = @dropDownMenu.find("ul li.selected.item").first()
         if code is 27 # Escape
-          @dropDownMenu.hide()
+          @_closeMenu()
         else if selected[0] is null or selected[0] is undefined
           selected = @dropDownMenu.find("ul li.item").first()
           selected.addClass "selected"

      @valueField.val id
      @id = parseInt id
      if @dropDownMenu.is(":visible")
        @dropDownMenu.hide()
      unless $(document).data('editedMode')
        was_initializing = @initializing
        if @initializing


    _buttonClick: (event) ->
      if @dropDownMenu.is(":visible")
        @_closeMenu()
      else if !@element.is(":disabled")
        this._openMenu()
      false
