{"action":"created","issue":{"url":"https://api.github.com/repos/text-mask/text-mask/issues/353","repository_url":"https://api.github.com/repos/text-mask/text-mask","labels_url":"https://api.github.com/repos/text-mask/text-mask/issues/353/labels{/name}","comments_url":"https://api.github.com/repos/text-mask/text-mask/issues/353/comments","events_url":"https://api.github.com/repos/text-mask/text-mask/issues/353/events","html_url":"https://github.com/text-mask/text-mask/issues/353","id":204734683,"number":353,"title":"onReject and onAccept callback functions aren't triggered when mask is a function","user":{"login":"FongChin","id":1923328,"avatar_url":"https://avatars.githubusercontent.com/u/1923328?v=3","gravatar_id":"","url":"https://api.github.com/users/FongChin","html_url":"https://github.com/FongChin","followers_url":"https://api.github.com/users/FongChin/followers","following_url":"https://api.github.com/users/FongChin/following{/other_user}","gists_url":"https://api.github.com/users/FongChin/gists{/gist_id}","starred_url":"https://api.github.com/users/FongChin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FongChin/subscriptions","organizations_url":"https://api.github.com/users/FongChin/orgs","repos_url":"https://api.github.com/users/FongChin/repos","events_url":"https://api.github.com/users/FongChin/events{/privacy}","received_events_url":"https://api.github.com/users/FongChin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-01T23:12:28Z","updated_at":"2017-02-02T17:31:47Z","closed_at":null,"body":"I only tested this in Ember. Is this by design that `onReject` and `onAccept` functions don't get triggered reliably when mask is a function?\r\n\r\n#### when mask is a function\r\n![wrong-behavior-on-accept](https://cloud.githubusercontent.com/assets/1923328/22530356/fe00a078-e88f-11e6-8eaa-858451adbf48.gif)\r\n\r\n#### when mask is an array\r\n![right-behavior-on-accept](https://cloud.githubusercontent.com/assets/1923328/22530358/02b4b582-e890-11e6-814e-2521e30f1b31.gif)\r\n"},"comment":{"url":"https://api.github.com/repos/text-mask/text-mask/issues/comments/277025318","html_url":"https://github.com/text-mask/text-mask/issues/353#issuecomment-277025318","issue_url":"https://api.github.com/repos/text-mask/text-mask/issues/353","id":277025318,"user":{"login":"lozjackson","id":10599852,"avatar_url":"https://avatars.githubusercontent.com/u/10599852?v=3","gravatar_id":"","url":"https://api.github.com/users/lozjackson","html_url":"https://github.com/lozjackson","followers_url":"https://api.github.com/users/lozjackson/followers","following_url":"https://api.github.com/users/lozjackson/following{/other_user}","gists_url":"https://api.github.com/users/lozjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/lozjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lozjackson/subscriptions","organizations_url":"https://api.github.com/users/lozjackson/orgs","repos_url":"https://api.github.com/users/lozjackson/repos","events_url":"https://api.github.com/users/lozjackson/events{/privacy}","received_events_url":"https://api.github.com/users/lozjackson/received_events","type":"User","site_admin":false},"created_at":"2017-02-02T17:31:47Z","updated_at":"2017-02-02T17:31:47Z","body":"OK, after some investigating I think the problem is in the core library.  [This line](https://github.com/text-mask/text-mask/blob/master/core/src/createTextMaskInputElement.js#L154)\r\n\r\nHopefully @msafi can help debug this.. \r\n\r\nI have found that if you use a mask like `[/\\d/, /\\d/, /\\d/, /\\d/]` the `onAccept` method never gets called.. and if you fill up all four characters and keep typing the `onReject` method doesn't get called either.\r\n\r\nI will take a deeper dig to see if I can get to the bottom of this.. but thought I'd share what I've found so far in case anyone else wants to know where to start looking."}}
{"actor":{"display_login":"lozjackson"}}