1. #1
    Sencha User PhiLho's Avatar
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    139
    Vote Rating
    1
    PhiLho is on a distinguished road

      0  

    Default KeyPressEvent UiHandler no longer works in Beta4

    KeyPressEvent UiHandler no longer works in Beta4


    Hello

    I have a problem which I hesitate to describe as bug, but which is a regression with regard to Beta3.
    I use the following code to enable the Return / Enter key to validate a form:
    Code:
    @UiHandler(value = { "userName", "password" })
    public void onKeyPress(KeyPressEvent event)
    {
      if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER)
      {
        doLogin();
      }
    }
    In a previous version, I used KeyUpEvent but in Beta3, it wasn't supported at all, even though it worked with plain GWT TextBox component. With TextField, Enter made the focus to go elsewhere, and I had to click again in the field to make Enter to work.
    KeyPressEvent worked well, so I went with it.

    We upgraded to Beta4 and it stopped working. I can see the typed chars in event.getNativeEvent().getCharCode() and the Tab char I use to jump between fields in event.getNativeEvent().getKeyCode(), but this method isn't called for Enter at all.

    So, is this a bug? Do I need to call some method to enable Enter to work? I believe this is important for usability.

    Side note: the TextButton doesn't seem to take focus, so I can't hit Tab and hit Enter on it to validate the form. I would appreciate a hint to make a Button to take focus too.

  2. #2
    Sencha User PhiLho's Avatar
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    139
    Vote Rating
    1
    PhiLho is on a distinguished road

      0  

    Default


    Bump.
    Is that a bug? If not, what is the proper way to handle this key press?

    http://www.sencha.com/forum/showthre...Issue&p=753073 bug report is somehow related (for the Login button...).

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar