ie9 richtexteditor event fix. Review at http://gwt-code-reviews.appspot.com/1384808 Review by: jlabanca@google.com git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9894 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java index ff460e3..82add82 100644 --- a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java +++ b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java
@@ -91,12 +91,14 @@ var elem = this.@com.google.gwt.user.client.ui.impl.RichTextAreaImpl::elem; var body = elem.contentWindow.document.body; - var handler = $entry(function() { + var handler = $entry(function(evt) { if (elem.__listener) { if (@com.google.gwt.user.client.impl.DOMImpl::isMyListener(Ljava/lang/Object;)(elem.__listener)) { // Weird: this code has the context of the script frame, but we need the // event from the edit iframe's window. - var evt = elem.contentWindow.event; + // this code is shared with all IE implementations (see RichText.gwt.xml) + // the event can be passed in as argument (IE9) or from the content window (IE8/7/6) + evt = evt || elem.contentWindow.event; @com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/EventListener;)(evt, elem, elem.__listener); } }