 			select = (el) ->
 				$timeout ->
 					$input.val(el.innerHTML).triggerHandler("input")
-					$lis.removeClass("show").removeClass("active").addClass "hide"
+					hideList()
 				null
 			scope.typeaheadKeydown = (evt) ->
 				switch evt.which

			$lis = $ul = currentEl = null
			$input = element.find "input"

			$timeout ->
				$ul = element.find "ul"
				$ul.addClass "hide"
				null

			setCurrent = (direction) ->
				return unless $ul[0].getElementsByClassName("show")[0]

					when 13, 32 # enter, space
						select(currentEl) if currentEl?
					when 27 # esc
						hideList()
						currentEl = null
					else
						currentEl.className = "show" if currentEl
