title: GWT capture event in RichTextArea or in IFrame
body: <p>I have a RichTextArea</p>
  
  <pre class="lang-java prettyprint-override"><code> private RichTextArea richTextArea;
  </code></pre>
  
  <p>and I'm trying to capture a paste event like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>DOM.sinkEvents((com.google.gwt.user.client.Element) richTextArea.getElement(), com.google.gwt.user.client.Event.ONPASTE);
  DOM.setEventListener((com.google.gwt.user.client.Element) richTextArea.getElement(), new EventListener(){
    @Override public void onBrowserEvent(Event event) {
       switch (event.getTypeInt()) {
          case Event.ONPASTE: Window.alert("hey");break;
       }
     }
  });
  </code></pre>
  
  <p>But it doesn't work, when I paste text on the richTextArea the alert is not triggered.</p>
  
  <p>Any idea how to capture this paste event?</p>
  
  <p>Thanks!</p>