jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput jqxNumberInput change event

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

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • jqxNumberInput change event #57750

    spiral75
    Participant

    Hi,
    When i used jqxNumberInput change event in mobiles, the sample alert which i kept is continuously displayed. Its reproducable at http://jsfiddle.net/spiral75/eHYb7/. This is happening in all android and ios devices.

    Thanks
    Spiral

    jqxNumberInput change event #57751

    Peter Stoev
    Keymaster

    Hi Spiral,

    Remove the Alert. The “change” event is raised on blur. So when the Alert is opened on mobile device, the event will be raised, then you will probably close it, the focus will go to the number input again and the alert will be displayed again and will take the focus and so on and so on. So, remove the alert is the solution and use another type of event logging.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxNumberInput change event #57753

    spiral75
    Participant

    Thanks Peter. Actually we are doing validation on ‘change’ event and if validation fails, we display a confirmation dialog box to user like “OK/CANCEL”. But after that , we are unable to goback to the screen. So is there any way to overcome this. This is happening only in mobiles. In desktops, its working fine. Also, my observation is ‘change’ event is acting as ‘valuechanged’ event in mobiles.

    Thanks
    Spiral

    jqxNumberInput change event #57754

    Peter Stoev
    Keymaster

    Hi Spiral,

    The event is actually raised by the HTML Input tag. There are several possible approaches – use different validation technique. Another option is to add some IF-Else blocks inside the “change” handler or use a popup which does not take the focus from the Input tag.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxNumberInput change event #57757

    spiral75
    Participant

    Thanks Peter. Also this an issue with the behaviour of jqxNumberInput change event on mobiles?

    Thanks
    Spiral

    jqxNumberInput change event #57758

    Peter Stoev
    Keymaster

    Hi Spiral,

    I am afraid that we don’t find this to be an issue, but a standard behavior of how focus and blur works on mobile. The “change” event is always raised on blur and dialog boxes by default receive the focus when opened which means that this will cause the Input tag’s blur and so the “change” event.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxNumberInput change event #57819

    spiral75
    Participant

    Hmm..Thanks Peter..but in “MOBILES”, change event is not raised on blur for jqxNumberInput, but its raised immediately after changing value.

    Thanks
    Spiral

    jqxNumberInput change event #57827

    Peter Stoev
    Keymaster

    Hi Spiral,

    Please, don’t write incorrect information. The “change” even on mobile is raised on blur, too. Just tested your Fiddle sample. Well, if you press the Spin Up/Spin Down buttons, the event will be raised, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxNumberInput change event #57837

    spiral75
    Participant

    Hi Peter,
    Sorry, I was using spin buttons to change the values which i didn’t specify above. So “change” event is raised immediately after changing the value using spin buttons. If its correct behaviour in mobiles, then its fine.

    Thanks
    Spiral

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

You must be logged in to reply to this topic.