-
10 Sep 2009 8:54 AM #1
[CLOSED] Window that opens child Window - Field loses focus immediately
[CLOSED] Window that opens child Window - Field loses focus immediately
If you have a main Window which opens a child Window and that child Window has a Field, the first time you click inside the Field, it will lose focus (blur) immediately. Thus, in order to type you have to click once (it loses focus), click again, then type.
To test, run the code below, click the button, then click inside the date field trigger to begin typing - it will lose focus and you will have to click again to regain focus.
Code:public static void testPopupBug() { final Window w = new Window(); w.setSize(100, 100); // On button click, display a new window with a simple date field Button b = new Button("Open new Window with date field"); b.addSelectionListener(new SelectionListener<ButtonEvent>() { public void componentSelected(ButtonEvent ce) { final Window popup = new Window(); popup.setSize(150, 150); final LayoutContainer c = new LayoutContainer(); c.add(new DateField()); popup.add(c); popup.show(); } }); w.add(b); // Display the main window after a short while new Timer() { @Override public void run() { w.show(); } }.schedule(500); }
-
10 Sep 2009 8:56 AM #2
This is already fixed in SVN and was reported here twice. Please use the forum search before posting bugs.
-
10 Sep 2009 9:08 AM #3
In my defense, a search for "window focus" in the GXT 2.0 bug forums only returns this thread and one that appears to be a different issue

By the way, would you be able to tell me if there was a single class modified to fix this issue? We may have to apply these bug fixes and build a patched version of GXT (because if we build directly off of SVN we encounter tons of UI issues).
-
10 Sep 2009 9:10 AM #4
The change was in the Window class.
You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote