 
   backspace: (event) =>
     @responder?.deleteBackward()
+    event.preventDefault()
 
   return: (event) =>
     @responder?.insertString("\n")
+    event.preventDefault()
 
   logAndCancel: (event) =>
     console.log "trapped event:", event

class Trix.Input
  @events: "keydown keypress drop cut copy paste input".split(" ")
  @keys:
    0x08: "backspace"
    0x0D: "return"

    @logAndCancel(event)

  cut: (event) =>
    @responder?.deleteBackward()

  paste: (event) =>
    if text = event.clipboardData.getData("text/plain")
      @responder?.insertString(text)
    event.preventDefault()

  input: (event) =>
    @responder?.render()
