     @save()
 
   didChangeDocument: (document) ->
-    defer =>
-      @save()
-      triggerEvent("input", onElement: @element)
+    defer @saveAndNotify
 
   shouldAcceptFile: (file) ->
     triggerEvent("trix-file-accept", onElement: @element, attributes: {file})

    @save()

  didEditAttachment: (attachment) ->
    @save()

  didRemoveAttachment: (attachment) ->
    triggerEvent("trix-attachment-remove", onElement: @element, attributes: {attachment})


  didChangeSelection: ->
    triggerEvent("selectionchange", onElement: @element, bubbles: false)

  # Private

  saveAndNotify: =>
    @save()
    triggerEvent("input", onElement: @element)
