       if name isnt ''
         cat.push(name)
         notebook.updateAttribute("categories", cat)
+        @cleanField(e)
 
       @el.hide()
 

    # Not sure where to put this, but it is global
    e.preventDefault()
    @el.hide().children().hide() if $(e.target)[0].nodeName isnt "INPUT"

  addCategory: (e) ->
    if e.type is "keyup" and e.which is 13

    "click .delete-popover #deleteNotebook": "deleteNotebook"
    "click .delete-popover #renameNotebook": "renameNotebook"
    "keyup .delete-popover #addCat": "addCategory"
    "focusout .delete-popover #addCat": "cleanField"

  constructor: ->
    super
