           $menuScope.items = []
           $menuScope.index = 0
 
-          $document.unbind "click", clickHandler
+          element.unbind "blur", clickHandler
 
         $scope.$apply() if invokeApply
 

  "$timeout"
  "$parse"
  "$rootScope"
  "$document"
  "keys"
  ($animate, $http, $filter, $compile, $timeout, $parse, $rootScope, $document, keys) ->
    restrict:    "EA"
    templateUrl: "template/autocomplete.html"
    transclude:  true

        else
          $animate.enter menuEl, angular.element(document.body)

        element.bind "blur", clickHandler

      ###
      @function
