1. Please look at the API of MDesktop [1]. That mixin is included to the
application root by default.
I would try to listen at the focus event on root and forward the focus to the
active window if one is opened, or the most top one. Just play a bit around
with that.
2. "appear" is the best event to set focus manually. So what's wrong if you
would just add a listener to the input field you want to be focused?
Like:
Textfield.addListener("appear", function() {
// wrap the focus into a time out to be sure that no other handler gets the
focus back
windows.setTimeout(this.focus.bind(this), 100);
});
[1]
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.window.MDesktop~activeWindow!property
Mustafa Sak
Softwareentwickler
Mail Development
1&1 Mail & Media Development & Technology GmbH | Brauerstraße 48 | 76135
Karlsruhe | Germany
Phone: +49 721 91374-6977
E-Mail: [email protected] | Web: www.1und1.de
-----Ursprüngliche Nachricht-----
Von: Dmitry A. Golubkov [mailto:[email protected]]
Gesendet: Mittwoch, 3. Juni 2015 13:21
An: qooxdoo Development
Betreff: [qooxdoo-devel] Qooxdoo focus set & restore
Dear Community,
Please help me to get the right way with the following:
1. In case, when one modal window open another one modal window (for instance
by click on form button), I want to restore focus on this button after second
window close. At now on second window close focus set to Application Root. Of
course I can do it inside window close handler, but I think it is not a general
way.
2. On window open focus set to this window, but for most cases I want to have
focus on form field inside this window. What the right way to do it? override
"focus" method, override "open" method, or set focus on "appear" event?
--
Best regards,
Dmitry Golubkov.
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel