zdfs / toscani

This is a jQuery-based, progressively-enhanced solution for creating a single-field credit card input. The idea is to create a more streamlined credit card entry process.
872 stars 102 forks source link

Firefox: Spacing between digits #15

Open mstuart opened 11 years ago

mstuart commented 11 years ago

In Firefox 14 for Mac, when typing digits in the credit card field... groups of digits aren't separated by a space like in other browsers.

zdfs commented 11 years ago

Any JavaScript errors? Chances are, there is a problem with the input mask plugin.

mstuart commented 11 years ago

Yes! there is... This is what I see in my FireBug console on line 280 of jquery.inputmask.js.

Error: useless setTimeout call (missing quotes around argument?) [Break On This Error]

Looks like opts.onKeyValidation.call(this, result, opts) resolves to undefined, so it causes the setTimeout to break.

setTimeout(opts.onKeyValidation.call(this, result, opts), 0); //extra stuff to execute on keydown
felixtriller commented 11 years ago

+1