Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Error with inputMask any case (v3.3.2)

Open augustobreno opened this issue 10 years ago • 4 comments

This occurs in brand new version 3.3.2. It was working on 3.3.1. :

Code:

<input data-inputmask="'alias': 'decimal', 'digits': 2, 'allowPlus':false, 'allowMinus':false, 'integerDigits':8" class=\"mask_esforco\"> </input>

$(".mask_esforco").inputmask();

Stack: jquery.inputmask.bundle.min.js.xhtml?ln=jquery:381 Uncaught TypeError: a.digits.split is not a functionmask @ jquery.inputmask.bundle.min.js.xhtml?ln=jquery:381g @ jquery.inputmask.bundle.min.js.xhtml?ln=jquery:59(anonymous function) @ jquery.inputmask.bundle.min.js.xhtml?ln=jquery:271each @ jquery.js.xhtml?ln=primefaces&v=5.3:14mask @ jquery.inputmask.bundle.min.js.xhtml?ln=jquery:271(anonymous function) @ jquery.inputmask.bundle.min.js.xhtml?ln=jquery:301each @ jquery.js.xhtml?ln=primefaces&v=5.3:14each @ jquery.js.xhtml?ln=primefaces&v=5.3:14a.fn.inputmask.a.fn.inputmask @ jquery.inputmask.bundle.min.js.xhtml?ln=jquery:301(anonymous function) @ gantt-eap.js.xhtml?ln=p4m:283i @ dhtmlxgantt.js.xhtml?ln=dhtmlxgantt:10t.callEvent @ dhtmlxgantt.js.xhtml?ln=dhtmlxgantt:10t.showLightbox @ dhtmlxgantt.js.xhtml?ln=dhtmlxgantt:205t._on_dblclick @ dhtmlxgantt.js.xhtml?ln=dhtmlxgantt:27

augustobreno avatar Sep 09 '16 14:09 augustobreno

Adding a jsfiddle to reproduce:

https://jsfiddle.net/xomwgufe/

augustobreno avatar Sep 09 '16 15:09 augustobreno

I can confirm the issue. It's not verifying if digits is a number.

Quick fix: Change 'digits': 2 to 'digits': '2'.

daltones avatar Sep 09 '16 15:09 daltones

Really crazy that all unittests fpr numeric misser that!!

RobinHerbots avatar Sep 09 '16 17:09 RobinHerbots

It seemed that the unittest ran a cached version .....

RobinHerbots avatar Sep 09 '16 21:09 RobinHerbots