Input type number seems not work properly on change

When i am using input numeric type in PlumSail the $on 'change' method seems to work only when valu field is changed by pressing up and down arrows, when the value is typed the method doesnt work, it fires then only on blur. How to fix this? Thx.

Hello,

Please can you share the code that you are using to do this?

Hello @szymanskicode,

Yes, for Number field type the change event triggers when it loses focus.

Why do you need to trigger change event while typing? Could you please share the use case.

Hello @Margo,
Yes, ofcourse. The answer is straight forward, to automate the proces of filling the form.

In my case users are filling the form using barcode scanners and when they scan the value it shoul be imidiately validated and base on validation they are redirected to another field ora just get a specific information (they can also fill the field manualy) and in current situation they are forced to click outside the field to take an action what is unwanted.

Beside this, the onChange should work like onchange and the current behaviour is callen onBlur soo that should be the name for this behaviour. :wink: Is there any chance for fix?

szymanskicode

@szymanskicode,

I've consulted with developers. The Number field is based on Kendo UI NumericTextBox and the change event works as designed. We can upgrade the change event for Number field, but this will be a paid support. If you are interested, please email us at support@plumsail.com.

Sorry, but i really don't understand your point of view? In my opinion, I should be paid for pointing, not properly working feature. If the method is called "onchange" and works as "onblur" its an issue/bug. In my opinion you should rework this field or change event name. To be clear, i just point this bug in a good faith.

Dear @szymanskicode,
Thank you for the feedback! We can add it to our task list, but we need to be careful not to break existing code for the users who have already created their forms with this functionality as is.

The case with dynamic change event is quite rare in our experience, most users just want to know that the value has changed after the fact. And as @Margo has pointed out, this terminology is based on the control that we use for the field, we didn't call it change ourselves.

You can try tracking input event on the element itself, like this:

var elem = $(fd.field('Number1').$el).find('input');
elem.bind("input", function(event){
  console.log(elem[1].value);
});

Thank you very much for your response. All the best for you all!

1 Like