         @dom.button.text 'Added'
         @dom.input.val ''
         @dom.input.focus()
+        @state.set saving: false
         @checkInput()
         setTimeout (=> @dom.button.text 'Add block'), 2000
 
       error: (_m, e) =>
         console.error e
+        @state.set saving: false
         @dom.button.text 'Error'
         setTimeout (=> @dom.button.text 'Add block'), 2000
 

    false

  save: ->
    val = @dom.input.val().trim()

    return if val is ''

    @dom.button.text 'Adding'

    attrs = if isURL val

    'keypress': 'onKeypress'
    'click .js-choose': 'choose'
    'click .js-button': 'save'

  initialize: ->
    @state = new Backbone.Model saving: false

  onInput: (e) ->
    @checkInput()
