New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method to Detect On Change Event For Masks Other than Credit Card #58
Comments
Thanks @mrentropy we will have a look. As you said, the usual onchange event shouldn't be affected. |
I had a look, the inner change event somehow breaks the original change event, will fix this. |
Any progress here? Love the library, would love to use it but my original change events are spotty at best when I use Cleave on the same input. |
If it helps anyone else, in my case setting the |
@trentarmstrong |
Hey! No worries. Not near my computer right now but when I am I can get you a better example of what I'm doing and the issue I'm seeing.
…Sent from my iPhone
On Jan 27, 2017, at 6:17 PM, Max Huang ***@***.***> wrote:
@trentarmstrong
Yes Cleave is doing something to prevent additional digits from being typed. Are you trying to enable 19 digits for your credit card formatter?
Also, sorry for the delay for this one, had no clue when I first looked at it, will follow up.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Here's a better example: $('#creditCard').change(function (e) {
// This fires inconsistently after binding with Cleave. I've noticed that
// it fails to fire if:
// 1. I copy and paste into the input field and tab away.
// 2. I try to type more characters than is allowed and tab away
// Hard to say if these are the only scenarios that fail, they are the only
// ones I could pin down.
});
var cleave = new Cleave('#creditCard', {
creditCard: true,
onCreditCardTypeChanged: function (type) {
// Do stuff.
}
}); Chrome 55.0.2883.95 |
Hey guys, sorry for the delay. I think this has been fixed in some release. @trentarmstrong The cases you had trouble with behave like this now:
That is to say: Above behaviours are consistent with native jQ input fields |
Closing this for now. Thanks guys |
It seems like Cleave prevents jQuery's usual onchange event from firing? It would be nice to either allow it, or create a custom callback as you've done for credit cards.
Really useful, though!
The text was updated successfully, but these errors were encountered: