Revision: 6056 Author: [email protected] Date: Tue Sep 1 07:32:49 2009 Log: Fixes a broken test in Safari 4 where the browser delays the actual setting of text in a TextArea if the text was set before attaching to the DOM. Swapping the order of two lines ensures we don't run into any bugs.
Patch by: jlabanca Review by: jgw (desk) http://code.google.com/p/google-web-toolkit/source/detail?r=6056 Modified: /trunk/user/test/com/google/gwt/user/client/ui/TextAreaTest.java ======================================= --- /trunk/user/test/com/google/gwt/user/client/ui/TextAreaTest.java Thu Jul 30 13:47:31 2009 +++ /trunk/user/test/com/google/gwt/user/client/ui/TextAreaTest.java Tue Sep 1 07:32:49 2009 @@ -54,11 +54,13 @@ private void testNewline(String text, int cursorPos, int startRange, int endRange) { TextBoxBase box = createTextBoxBase(); - box.setText(text); RootPanel.get().add(box); // Browsers will manipulate the text when attached to the DOM, so we need - // to get the new value. + // to get the new value. Safari 4 delays the manipulation if the text was + // set before attaching the TextArea to the DOM, so we attach first and set + // the text second. + box.setText(text); text = box.getText(); // Position the cursor in the newlines --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
