             @element.data("font_size", font_size)
 
     undo: () =>
+        if @state != 'ready'
+            return
         if not @syncstring.in_undo_mode()
             @_handle_dom_change()
         else if @dom.get(true) != @_last_dom  # expensive but I don't know how to handle this case otherwise since dirty checking so hard...

            @save_button.addClass('disabled')

    save: (cb) =>
        if not @save_button?
            return
        @save_button.icon_spin(start:true, delay:5000)
        async.parallel [@dom.save, @syncstring.save], (err) =>
            if not @save_button?
                return
            @save_button.icon_spin(false)
            @update_save_state()

        @element.data("font_size", font_size)

    font_size_change: (delta) =>
        if @state != 'ready'
            return
        font_size = @element.data("font_size")
        # console.log("font_size_change #{delta} applied to #{font_size}")
        if font_size?
