{"action":"created","issue":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/780","labels_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/780/labels{/name}","comments_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/780/comments","events_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/780/events","html_url":"https://github.com/RobinHerbots/jquery.inputmask/issues/780","id":52361349,"number":780,"title":"When two masks specified backspace clears the whole input instead of last char","user":{"login":"tomaj-miszczu","id":4173680,"avatar_url":"https://avatars.githubusercontent.com/u/4173680?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaj-miszczu","html_url":"https://github.com/tomaj-miszczu","followers_url":"https://api.github.com/users/tomaj-miszczu/followers","following_url":"https://api.github.com/users/tomaj-miszczu/following{/other_user}","gists_url":"https://api.github.com/users/tomaj-miszczu/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaj-miszczu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaj-miszczu/subscriptions","organizations_url":"https://api.github.com/users/tomaj-miszczu/orgs","repos_url":"https://api.github.com/users/tomaj-miszczu/repos","events_url":"https://api.github.com/users/tomaj-miszczu/events{/privacy}","received_events_url":"https://api.github.com/users/tomaj-miszczu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/labels/Main","name":"Main","color":"d7e102"},{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/labels/Multi%20&%20Alternation","name":"Multi & Alternation","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"RobinHerbots","id":318447,"avatar_url":"https://avatars.githubusercontent.com/u/318447?v=3","gravatar_id":"","url":"https://api.github.com/users/RobinHerbots","html_url":"https://github.com/RobinHerbots","followers_url":"https://api.github.com/users/RobinHerbots/followers","following_url":"https://api.github.com/users/RobinHerbots/following{/other_user}","gists_url":"https://api.github.com/users/RobinHerbots/gists{/gist_id}","starred_url":"https://api.github.com/users/RobinHerbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobinHerbots/subscriptions","organizations_url":"https://api.github.com/users/RobinHerbots/orgs","repos_url":"https://api.github.com/users/RobinHerbots/repos","events_url":"https://api.github.com/users/RobinHerbots/events{/privacy}","received_events_url":"https://api.github.com/users/RobinHerbots/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/milestones/17","html_url":"https://github.com/RobinHerbots/jquery.inputmask/milestones/3.5","labels_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/milestones/17/labels","id":857136,"number":17,"title":"3.5","description":"Whatever in the future","creator":{"login":"RobinHerbots","id":318447,"avatar_url":"https://avatars.githubusercontent.com/u/318447?v=3","gravatar_id":"","url":"https://api.github.com/users/RobinHerbots","html_url":"https://github.com/RobinHerbots","followers_url":"https://api.github.com/users/RobinHerbots/followers","following_url":"https://api.github.com/users/RobinHerbots/following{/other_user}","gists_url":"https://api.github.com/users/RobinHerbots/gists{/gist_id}","starred_url":"https://api.github.com/users/RobinHerbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobinHerbots/subscriptions","organizations_url":"https://api.github.com/users/RobinHerbots/orgs","repos_url":"https://api.github.com/users/RobinHerbots/repos","events_url":"https://api.github.com/users/RobinHerbots/events{/privacy}","received_events_url":"https://api.github.com/users/RobinHerbots/received_events","type":"User","site_admin":false},"open_issues":68,"closed_issues":32,"state":"open","created_at":"2014-11-07T09:38:21Z","updated_at":"2015-04-07T09:26:39Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2014-12-18T13:02:31Z","updated_at":"2015-04-07T09:26:39Z","closed_at":"2015-04-07T09:26:39Z","body":"Hello,\r\nwhen I specify two alternative masks for an input, like this:\r\n```javascript\r\n$('input').inputmask({\r\n    mask: ['999 99 99 999', 'aa 999 99 99 999']\r\n});\r\n```\r\nand then enter \"123 45\" into the input and the press backspace the whole input is being cleared instead of just wiping the last digit.\r\n\r\nI tried also version with one mask containing optional part, defined like this:\r\n```javascript\r\nmask: '[aa ]999 99 99 999'\r\n```\r\nbut then the inputmask pattern is visible for the whole time despite of having the showMaskOnHover and showMaskOnFocus set to false. I think it might be related with the optional part being declared in the beginning of the mask."},"comment":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/comments/90481355","html_url":"https://github.com/RobinHerbots/jquery.inputmask/issues/780#issuecomment-90481355","issue_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/780","id":90481355,"user":{"login":"RobinHerbots","id":318447,"avatar_url":"https://avatars.githubusercontent.com/u/318447?v=3","gravatar_id":"","url":"https://api.github.com/users/RobinHerbots","html_url":"https://github.com/RobinHerbots","followers_url":"https://api.github.com/users/RobinHerbots/followers","following_url":"https://api.github.com/users/RobinHerbots/following{/other_user}","gists_url":"https://api.github.com/users/RobinHerbots/gists{/gist_id}","starred_url":"https://api.github.com/users/RobinHerbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobinHerbots/subscriptions","organizations_url":"https://api.github.com/users/RobinHerbots/orgs","repos_url":"https://api.github.com/users/RobinHerbots/repos","events_url":"https://api.github.com/users/RobinHerbots/events{/privacy}","received_events_url":"https://api.github.com/users/RobinHerbots/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T09:26:38Z","updated_at":"2015-04-07T09:26:38Z","body":"http://jsfiddle.net/sskr5qoa/6/"}}