make focus event to make the button clicked

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

make focus event to make the button clicked

paragasu
I have a textfield and a button next to it.
clicking on the button will popup file chooser (to upload file).

is it possible to trigger the user click event of the button when the user
focus on the textfield?


Regards,
Paragasu

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: make focus event to make the button clicked

Tom Saddul
This post was updated on .
Did you try textField.addListener("click", ...) ?
Reply | Threaded
Open this post in threaded view
|

Re: make focus event to make the button clicked

Mustafa Sak-5
In reply to this post by paragasu

If your button is an qx button, use .fireEvent("execute").
 
If you try to trigger a native browse input element, this could be tricky. Sure you can dispatch an user click event by code, but on such sensitive interfaces to the file system, most browser will restrict that. So for browser they don't permit to open browse dialog by code, you can trick the system by overleying your text field with an native input field and just make it transparent. But the user has to click any way.

Gruß
Mustafa Sak

Applications & Integration

1&1 Internet AG | Ernst-Frey-Straße 10 | 76135 Karlsruhe | Germany
Phone: +49 721 91374-6977
E-Mail: [hidden email] | Web: www.1und1.de

Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 6484

Vorstand: Frank Einhellinger, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Uwe Lamnek
Aufsichtsratsvorsitzender: Michael Scheeren

Member of United Internet



-------- Ursprüngliche Nachricht --------
Von: paragasu <[hidden email]>
Gesendet: Sunday, August 2, 2015 02:31 PM
An: qooxdoo Development <[hidden email]>
Betreff: [qooxdoo-devel] make focus event to make the button clicked

I have a textfield and a button next to it.
clicking on the button will popup file chooser (to upload file).

is it possible to trigger the user click event of the button when the user
focus on the textfield?


Regards,
Paragasu

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel