{"action":"created","issue":{"url":"https://api.github.com/repos/cwill747/angular-libphonenumber/issues/8","labels_url":"https://api.github.com/repos/cwill747/angular-libphonenumber/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/cwill747/angular-libphonenumber/issues/8/comments","events_url":"https://api.github.com/repos/cwill747/angular-libphonenumber/issues/8/events","html_url":"https://github.com/cwill747/angular-libphonenumber/issues/8","id":126802162,"number":8,"title":"backspacing problem","user":{"login":"dbaq","id":1867703,"avatar_url":"https://avatars.githubusercontent.com/u/1867703?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaq","html_url":"https://github.com/dbaq","followers_url":"https://api.github.com/users/dbaq/followers","following_url":"https://api.github.com/users/dbaq/following{/other_user}","gists_url":"https://api.github.com/users/dbaq/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaq/subscriptions","organizations_url":"https://api.github.com/users/dbaq/orgs","repos_url":"https://api.github.com/users/dbaq/repos","events_url":"https://api.github.com/users/dbaq/events{/privacy}","received_events_url":"https://api.github.com/users/dbaq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cwill747/angular-libphonenumber/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cwill747/angular-libphonenumber/milestones/3","html_url":"https://github.com/cwill747/angular-libphonenumber/milestones/v0.0.9","labels_url":"https://api.github.com/repos/cwill747/angular-libphonenumber/milestones/3/labels","id":1534444,"number":3,"title":"v0.0.9","description":null,"creator":{"login":"cwill747","id":284849,"avatar_url":"https://avatars.githubusercontent.com/u/284849?v=3","gravatar_id":"","url":"https://api.github.com/users/cwill747","html_url":"https://github.com/cwill747","followers_url":"https://api.github.com/users/cwill747/followers","following_url":"https://api.github.com/users/cwill747/following{/other_user}","gists_url":"https://api.github.com/users/cwill747/gists{/gist_id}","starred_url":"https://api.github.com/users/cwill747/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwill747/subscriptions","organizations_url":"https://api.github.com/users/cwill747/orgs","repos_url":"https://api.github.com/users/cwill747/repos","events_url":"https://api.github.com/users/cwill747/events{/privacy}","received_events_url":"https://api.github.com/users/cwill747/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2016-01-22T14:40:35Z","updated_at":"2016-01-22T18:57:32Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-01-15T03:41:00Z","updated_at":"2016-01-22T19:15:21Z","closed_at":"2016-01-22T18:57:32Z","body":"**Overview of the Issue**\r\nWhen using the singapore country code (\"sg\") and entering `012345`, the backspace key works fine to remove the 5 but then got stuck and cannot remove `01234`.\r\n<img width=\"400\" alt=\"screen shot 2016-01-14 at 7 31 23 pm\" src=\"https://cloud.githubusercontent.com/assets/1867703/12344757/a7315d1e-baf5-11e5-9ce2-42a363403aac.png\">\r\n<img width=\"398\" alt=\"screen shot 2016-01-14 at 7 31 33 pm\" src=\"https://cloud.githubusercontent.com/assets/1867703/12344754/9fce79c6-baf5-11e5-8a31-dc2abc41abd0.png\">\r\n\r\n**Angular Version**: v1.4.3\r\n**Angular libphonenumber Version:** 0.0.7\r\n**Browsers and Operating System:** Able to reproduce on chrome and on mobile devices via cordova\r\n**Reproduce the Error:** just run the basic example with singapore country code, enter 012345 then try to delete.\r\n**Suggest a Fix:** I was not able to isolate the part of the code yet.\r\n\r\nThanks for your help!\r\n\r\n**EDIT 1:** By triming the returned value of the clean function, the problem disappears. Replace that line (https://github.com/cwill747/angular-libphonenumber/blob/master/src/phone-number.js#L91) by:\r\n```diff\r\n-return formattedValue;\r\n+return formattedValue.trim();\r\n```\r\nBefore opening a PR, I would like to know your thoughts on the issue and make sure it won't cause any regression. Thanks"},"comment":{"url":"https://api.github.com/repos/cwill747/angular-libphonenumber/issues/comments/174016136","html_url":"https://github.com/cwill747/angular-libphonenumber/issues/8#issuecomment-174016136","issue_url":"https://api.github.com/repos/cwill747/angular-libphonenumber/issues/8","id":174016136,"user":{"login":"dbaq","id":1867703,"avatar_url":"https://avatars.githubusercontent.com/u/1867703?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaq","html_url":"https://github.com/dbaq","followers_url":"https://api.github.com/users/dbaq/followers","following_url":"https://api.github.com/users/dbaq/following{/other_user}","gists_url":"https://api.github.com/users/dbaq/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaq/subscriptions","organizations_url":"https://api.github.com/users/dbaq/orgs","repos_url":"https://api.github.com/users/dbaq/repos","events_url":"https://api.github.com/users/dbaq/events{/privacy}","received_events_url":"https://api.github.com/users/dbaq/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T19:15:21Z","updated_at":"2016-01-22T19:15:21Z","body":"Thanks for merging the PR, are you going to push https://github.com/cwill747/angular-libphonenumber/milestones/v0.0.9 anytime soon?"}}