{"action":"opened","issue":{"url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/965","labels_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/965/labels{/name}","comments_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/965/comments","events_url":"https://api.github.com/repos/RobinHerbots/jquery.inputmask/issues/965/events","html_url":"https://github.com/RobinHerbots/jquery.inputmask/issues/965","id":93632371,"number":965,"title":"Auto position cursor at end of data on focus","user":{"login":"gbronzer","id":5521279,"avatar_url":"https://avatars.githubusercontent.com/u/5521279?v=3","gravatar_id":"","url":"https://api.github.com/users/gbronzer","html_url":"https://github.com/gbronzer","followers_url":"https://api.github.com/users/gbronzer/followers","following_url":"https://api.github.com/users/gbronzer/following{/other_user}","gists_url":"https://api.github.com/users/gbronzer/gists{/gist_id}","starred_url":"https://api.github.com/users/gbronzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbronzer/subscriptions","organizations_url":"https://api.github.com/users/gbronzer/orgs","repos_url":"https://api.github.com/users/gbronzer/repos","events_url":"https://api.github.com/users/gbronzer/events{/privacy}","received_events_url":"https://api.github.com/users/gbronzer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-07T21:22:15Z","updated_at":"2015-07-07T21:22:15Z","closed_at":null,"body":"I'm trying to figure out how to auto position the cursor when a user tabs into an input mask that is partially completed. Our specific scenario deals with phone numbers where we prefill the area code with a default and want to start the cursor after the area code.\r\n\r\nI can easily detect if they just have the area code and just position the cursor, but I'd like it to be intelligent in case they have more or less filled in. The issue is I can't figure out a way to know where the finished data is in the masked value.\r\n\r\nThe mask is (999) 999-9999. For example, if they've only got 2 digits pre-existing, the position is 3, but if they have 7 existing, then the position would be 10 due to the mask's () and -.\r\n\r\nIs there a way to pull this off by querying inputmask for where it's tracking what's already been filled?\r\n\r\nThanks!"}}