I have a question related to this. I have a KeyPressHandler in the TextBox. When the user presses "Enter", I want to simulate it as "Tab".
I have added the necessary code to capture the 'Enter" event, and then I fire the new event using the DomEvent.fireNativeEvent. NativeEvent tabEvent = Document.get().createKeyPressEvent(false, false, false, false, 9, 9); DomEvent.fireNativeEvent(tabEvent, textBox); What I am hoping to see is the 'tabbing' of the current cursor to the next Focusable widget, but it doesn't seem to happen. What am I missing? It basically re-enteres the KeyPressHandler since this is the widget that is being fired. In short, I need the way to suppress the current KeyPressHandler and have the Browser level KeyPressHandler of the 'tabbing' to occur. Any help is appreciated. Regards On May 5, 11:01 am, Thomas Broyer <[email protected]> wrote: > On May 4, 9:43 pm, Lukas Laag <[email protected]> wrote: > > > It is possible to generate events programmatically in JavaScript. This > > page gives a good overview of the topic, includingkeyevents (look > > for 'Manually firing events'): > > >http://www.howtocreate.co.uk/tutorials/javascript/domevents. > > > I do not know if generating atabevent like this in a JSNI method > > you actually don't need JSNI: just use Document.get().createXxxEvent() > and DomEvent.fireNativeEvent(). > > > would solve your focus problem. > > I doubt it would, otherwise people would have proposed it as a > workaround:http://stackoverflow.com/questions/2398528/set-textbox-focus-in-mobil... > > (note: according to "the web", it's a bug in WebKit) > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
