Hi
In 3.0.1 I have trouble setting focus to a widget where I previously didn't in
1.4.1
As an example some code below ("focus issue regular window") in which I can see
the same issue in the playground of the current release.
In code I can see the following happen:
- I focus my control
- window.show() always sets the focus to itself thus losing the focus I
just set.
This can be fixed in many of my cases by moving the "textField.focus" call
after the window is shown.
However, when the window is modal (I need some of those as well) this doesn't
work. Example below for the playground as well ("focus issue modal window"). In
the core code I see that after my window is shown some blocker code kicks in
where method _backupActiveWidget in Blocker.js puts the puts the focus on the
root of my application. I can only work around this using a timer so put the
focus to the control I want, but this feels just wrong (how long should the
interval be to guarantee the right behavior).
Is this a bug or a feature? And can I work around this in another way?
Best regards,
Jeroen
******** focus issue regular window ********
var win = new qx.ui.window.Window("Modal window");
win.setWidth(300);
win.setHeight(200);
var textField = new qx.ui.form.TextField("focus test");
textField.setWidth(100);
textField.setHeight(20);
textField.focus();
win.add(textField, {left: 5, top: 5});
this.getRoot().add(win, {left: 20, top: 20});
win.open();
******** focus issue modal window ********
var win = new qx.ui.window.Window("Modal window");
win.setWidth(300);
win.setHeight(200);
var textField = new qx.ui.form.TextField("focus test");
textField.setWidth(100);
textField.setHeight(20);
win.add(textField, {left: 5, top: 5});
this.getRoot().add(win, {left: 20, top: 20});
win.setModal(true);
win.open();
textField.focus();
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel