Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Left (or) Right arrow key event do not work for a FormItem


    Hi,

    We are using smartgwt version 2.2.

    I have a key-press event and listener in the below code snippet for a FormItem (for example a TextField). when user enter some input in the textfield and press "Enter" button from key board, search function triggers and return the matching results.

    But consider the case, where user enter "1234" text in one of the input Textfield and wants to remove "2" from his entered input by using left/right arrow keys but he couldn't since the cursor blinks on the textfield but doesn't move either left/right. The workaround is he has to select entire text and remove it. This is the pain for him.


    I am adding the below snippet of the code. Could you please help me what is wrong?

    Code snippet
    =========

    privatevoid addKeyPressHandlers(FormItem formItem) {
    formItem.addKeyPressHandler(new KeyPressHandler()
    {
    @Override
    public void onKeyPress(KeyPressEvent event)
    {
    String keyName = event.getKeyName();
    if (KeyNames.ENTER.equals(keyName))
    {
    //do some thing
    }
    }
    });
    }



    Regards,
    Ravikanth Manik.

  • #2
    Hi,
    Can anyone face similar issue, please reply me. I appreciate your help on this.

    Best,
    Ravikanth Manik.

    Comment

    Working...
    X