package sample.test.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.FocusListenerAdapter;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class TestClient implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
          VerticalPanel vPanel = new VerticalPanel();
          TextBox tBox1 = new TextBox();
          TextBox tBox2 = new TextBox();
          tBox2.addFocusListener(new FocusListenerAdapter() {
                  @Override
                  public void onLostFocus(Widget sender) {
                          TextBox tBox = (TextBox)sender;
                          if(!tBox.getText().equals("good"))
                                  tBox.setFocus(true);
                  }
          });
          vPanel.add(tBox1);
          vPanel.add(tBox2);
          RootPanel.get().add(vPanel);
          return;
  }
}

In hosted mode (WinXP GWT 1.5.1) and in IE (IE6 and IE7) this code
works as expected - if the user types in something other than "good"
in the second box and attempts to leave the box then focus is
immediately returned to tBox2.  However, in Firefox (FF2 and FF3)
focus is not returned to tBox2 when it should be.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to