jQWidgets Forums

jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable jqxValidator keyup is triggered by TAB key

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 10 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • jean-frederic
    Participant

    Hello,

    In this example :

    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxvalidator/index.htm#demos/jqxvalidator/defaultfunctionality.htm

    Name validation :
    { input: ‘#userInput’, message: ‘Username is required!’, action: ‘keyup, blur’, rule: ‘required’ },

    Password validation :
    { input: ‘#passwordInput’, message: ‘Password is required!’, action: ‘keyup, blur’, rule: ‘required’ },

    When you click on the UserName Field, nothing happen. If you hit “TAB” key inside UserName field, you will switch to Password field.

    Validation for UserName will be triggered by the “blur” event and will return an error since the field is empty.

    BUT… the issue is with the Password Field. Trigger are : KeyUp and Blur. When you “enter” the field using TAB Key, you trigger the keyup event and the validator return an error right away.

    Is there a way to “ignore” TAB key inside Keyup Event ?

    Thanks

    Jean-Frederic
    Canam Group


    Dimitar
    Participant

    Hello Jean-Frederic,

    Unfortunately, this cannot be achieved. You can, however, change the event to “keydown” instead.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    jean-frederic
    Participant

    Hello,

    Unfortunately, this is not better, this is even worst.

    If the validation of the field is “must not be empty”.

    Then I hit TAB, I enter that field and yes, there is no error validation.

    But when I type the first Key, on keydown event, it will look for the field to not be empty, but it will be empty since the letter is not added to the field before the “keydown” event.

    So, I end up with a field, with one letter inside and an error message saying the field must not be empty.


    Dimitar
    Participant

    Hi jean-frederic,

    Unfortunately, we cannot provide you with a solution on the matter. Maybe you can fire the validation on “blur” only?

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.