     handler
 
   triggerEvent: (eventName, {onElement, bubbles, cancelable} = {}) ->
-    element = onElement ? document.documentElement
+    element = onElement ? html
     bubbles = bubbles isnt false
     cancelable = cancelable isnt false
 

Trix.DOM = dom =
  handleEvent: (eventName, {onElement, matchingSelector, withCallback, inPhase, preventDefault} = {}) ->
    element = onElement ? document.documentElement
    selector = matchingSelector
    callback = withCallback
    useCapture = inPhase is "capturing"

      else NodeFilter.SHOW_ALL

    document.createTreeWalker(tree, whatToShow, usingFilter, expandEntityReferences is true)
