         else
           $animate.enter menuEl, angular.element(document.body)
 
-        $document.bind "click", clickHandler
+        element.bind "blur", clickHandler
 
       ###
       @function

          $menuScope.items = []
          $menuScope.index = 0

          $document.unbind "click", clickHandler

        $scope.$apply() if invokeApply


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