Friday, February 3, 2012

Re: in Firefox9, when i press enter key, enent.getCharCode() is 0.

Use event.getNativeCode (or simillar)

El 3 de febrero de 2012 00:14, yl chen <nicola.java@gmail.com> escribió:
                              newSymbolTextBox = new TextBox();
               newSymbolTextBox.addKeyPressHandler(new KeyPressHandler() {
                       public void onKeyPress(KeyPressEvent event) {
                               Window.alert("keycode:"+(int)event.getCharCode());
                               if (event.getCharCode() == KeyCodes.KEY_ENTER){
                                       addStock();
                               }

                       }
               });

in ie. when i press enter  key, event.getCharCode() is 13.
in Firefox9, when i press enter key, enent.getCharCode() is 0.

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

No comments:

Post a Comment