Reviewers: jgw, Description: This patch fixes a few issues in RichTextArea:
Issue 3133: Events triggered by RichTextArea are not sent through the normal event system, so none of the DOM methods that rely on currentEvent work. I fixed this by calling DOM#dispatchEvent() instead of calling Widget#onBrowserEvent() directory. Issue 3176 and 3503: Most of the browsers behave weirdly when you programatically focus the RichTextArea immediately after attaching it. Firefox doesn't show the text caret. Safari/Chrome catch key events, but you can't actually type. I modified the code to delay focus until the widget is fully initialized, normalizing the behavior across all browsers. In Firefox, we use a hack (focus, blur, focus) to ensure that text caret appears. Blur Bug: Old Mozilla throws an exception whenever blur is called. I added a deferred binding to ignore the blur request. Safari/Chrome Focus Handlers: Safari and Chrome never fire focus handlers before we add the events to the iframe instead of its content window. This is now fixed. Testing: ======== I manually verified these changes in all browsers. I also wrote some unit tests as best I could to catch the associated errors. Please review this at http://gwt-code-reviews.appspot.com/50803 Affected files: user/src/com/google/gwt/user/RichText.gwt.xml user/src/com/google/gwt/user/User.gwt.xml user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplIE6.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplMozilla.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplOldMozilla.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplOpera.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplSafari.java user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
