 
             if event.keyCode == 13
                 saveInputTag()
+            else if event.keyCode == 27
+                $el.find('.save').hide()
+                $el.find("input").hide()
+                $el.find("input").val('')
+                $el.find('.add-tag').show()
             else if target.val().length
                 $el.find('.save').show()
             else

                })

        $el.on "keypress", "input", (event) ->
            return if event.keyCode != 13
            event.preventDefault()

        $el.on "keyup", "input", (event) ->

            input.autocomplete("close")
            $el.find('.save').hide()

        bindOnce $scope, "project", (project) ->
            # If not editable, no tags preloading is needed.
            editable = $attrs.editable == "true" and project.my_permissions.indexOf($attrs.requiredPerm) != -1

            if not editable
                $el.find("input").remove()
