It is possible to generate events programmatically in JavaScript. This
page gives a good overview of the topic, including key events (look
for 'Manually firing events'):

http://www.howtocreate.co.uk/tutorials/javascript/domevents.

I do not know if generating a tab event like this in a JSNI method
would solve your focus problem. If you give it a try, can you please
let us know how this fares ?

Lukas

On May 4, 4:12 pm, Daniel Simons <daniel.simo...@gmail.com> wrote:
> I am creating a mobile web app with GWT and have discovered that the
> TextBox.setFocus(true) method does not work in mobile Safari.  I also tried
> using JSNI to directly call element.focus(), which also did not work.
>  Looking at other potential work arounds, the textbox in my application that
> I would like to focus on happens to be the input immediately following the
> input for which the event is being triggered.  Therefore, if I could somehow
> simulate the pressing of the "TAB" key inside that event, I could achieve a
> similar result to "setFocus(true)".  Could anyone explain how I could go
> about simulating the TAB Key press?
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to