Closed s1monj closed 4 years ago
Hey @s1monj
The plugin's onKeyPress behaviour has a peculiar behaviour attached to it. If you want you can always use the native events from jQuery.
$('.cep_with_callback').on('keypress', function(e) {
const cep = e.target.value;
console.log('a key was pressed!:', cep);
if (event.which == 13) {
console.log('enter key is pressed, ', cep);
}
})
.mask('0#');
great thanks that did the trick
great plugin, thanks for your work
I want to trigger a function when the enter key is pressed - ie the user types a number of unknown length (using '0#' mask) and then hits the enter key to submit
I tried adding 13 to the byPassKeys, but it still prevents the onKeyPress from firing
http://jsfiddle.net/simonlj/jcuh4ev7/14/