         if $(document.activeElement).closest("#share-message").length == 0
           $("#share-message").fadeOut("fast")
       ), 0
+    unless @isFirefox()
+      # Unfortunately my current text-editing situation only works on chrome. It relies on being able to
+      # create a TextInput event, and initTextEvent isn't implemented in firefox yet.
+      $("#contents").on "keydown", "#edit-box", (e) => @onEditBoxKeydown(e)
+      $("#contents").on "keyup", "#edit-box", (e) => @onEditBoxKeyup(e)
 
     @loadRendered()
+
+  # Basing our detection on the one feature that we differentiate on
+  isFirefox: -> !document.createEvent("TextEvent").initTextEvent?
 
   disableControls: ->
     $("#left").addClass("disabled")

    $editBox = $("<textarea id='edit-box'></textarea>")
    $editBox.text(data)
    $("#contents").html($editBox)

  # Show an error with the page loading.
  onError: (jqXHR, textStatus, errorThrown) ->


  # Show a text edit box with the current contents inside.
  onEditSuccess: (data, textStatus, jqXHR) ->
    format = @currentFormat()
    switch(format)
      when "text"
