{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments/32038787","id":32038787,"diff_hunk":"@@ -264,10 +264,23 @@\n     /**\n      * Validates the input element and sets an error style if needed.\n      */\n-     validate: function () {\n+     validate: function() {\n        return this.inputElement.validate();\n      },\n \n+    /**\n+     * Restores the cursor to its original position after updating the value.\n+     */\n+    updateValueAndPreserveCaret: function(newValue) {\n+      var start = this.inputElement.selectionStart;","path":"paper-input-behavior.html","position":13,"original_position":13,"commit_id":"0bc4aab5707785982184f61162cd961b7ff05bf9","original_commit_id":"0bc4aab5707785982184f61162cd961b7ff05bf9","user":{"login":"notwaldorf","id":1369170,"avatar_url":"https://avatars.githubusercontent.com/u/1369170?v=3","gravatar_id":"","url":"https://api.github.com/users/notwaldorf","html_url":"https://github.com/notwaldorf","followers_url":"https://api.github.com/users/notwaldorf/followers","following_url":"https://api.github.com/users/notwaldorf/following{/other_user}","gists_url":"https://api.github.com/users/notwaldorf/gists{/gist_id}","starred_url":"https://api.github.com/users/notwaldorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notwaldorf/subscriptions","organizations_url":"https://api.github.com/users/notwaldorf/orgs","repos_url":"https://api.github.com/users/notwaldorf/repos","events_url":"https://api.github.com/users/notwaldorf/events{/privacy}","received_events_url":"https://api.github.com/users/notwaldorf/received_events","type":"User","site_admin":false},"body":"Oh god, that, and I forgot (again) that `<input type=number>` can't use selectionStart.\r\n","created_at":"2015-06-09T17:19:54Z","updated_at":"2015-06-09T17:19:54Z","html_url":"https://github.com/PolymerElements/paper-input/pull/70#discussion_r32038787","pull_request_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments/32038787"},"html":{"href":"https://github.com/PolymerElements/paper-input/pull/70#discussion_r32038787"},"pull_request":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70","id":37201830,"html_url":"https://github.com/PolymerElements/paper-input/pull/70","diff_url":"https://github.com/PolymerElements/paper-input/pull/70.diff","patch_url":"https://github.com/PolymerElements/paper-input/pull/70.patch","issue_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/70","number":70,"state":"open","locked":false,"title":"add formatting helper","user":{"login":"notwaldorf","id":1369170,"avatar_url":"https://avatars.githubusercontent.com/u/1369170?v=3","gravatar_id":"","url":"https://api.github.com/users/notwaldorf","html_url":"https://github.com/notwaldorf","followers_url":"https://api.github.com/users/notwaldorf/followers","following_url":"https://api.github.com/users/notwaldorf/following{/other_user}","gists_url":"https://api.github.com/users/notwaldorf/gists{/gist_id}","starred_url":"https://api.github.com/users/notwaldorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notwaldorf/subscriptions","organizations_url":"https://api.github.com/users/notwaldorf/orgs","repos_url":"https://api.github.com/users/notwaldorf/repos","events_url":"https://api.github.com/users/notwaldorf/events{/privacy}","received_events_url":"https://api.github.com/users/notwaldorf/received_events","type":"User","site_admin":false},"body":"Added a helper formatting method (came up during https://github.com/PolymerElements/gold-phone-input/pull/16) that updates the value imperatively and preserves the caret position.","created_at":"2015-06-08T22:15:31Z","updated_at":"2015-06-09T17:19:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cd0228416de5103b08cef5abe918c668b22e4ce","assignee":{"login":"morethanreal","id":1202776,"avatar_url":"https://avatars.githubusercontent.com/u/1202776?v=3","gravatar_id":"","url":"https://api.github.com/users/morethanreal","html_url":"https://github.com/morethanreal","followers_url":"https://api.github.com/users/morethanreal/followers","following_url":"https://api.github.com/users/morethanreal/following{/other_user}","gists_url":"https://api.github.com/users/morethanreal/gists{/gist_id}","starred_url":"https://api.github.com/users/morethanreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morethanreal/subscriptions","organizations_url":"https://api.github.com/users/morethanreal/orgs","repos_url":"https://api.github.com/users/morethanreal/repos","events_url":"https://api.github.com/users/morethanreal/events{/privacy}","received_events_url":"https://api.github.com/users/morethanreal/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70/commits","review_comments_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70/comments","review_comment_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/70/comments","statuses_url":"https://api.github.com/repos/PolymerElements/paper-input/statuses/0bc4aab5707785982184f61162cd961b7ff05bf9","head":{"label":"PolymerElements:formatting-helper","ref":"formatting-helper","sha":"0bc4aab5707785982184f61162cd961b7ff05bf9","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":34294743,"name":"paper-input","full_name":"PolymerElements/paper-input","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/paper-input","description":"A Material Design text field","fork":false,"url":"https://api.github.com/repos/PolymerElements/paper-input","forks_url":"https://api.github.com/repos/PolymerElements/paper-input/forks","keys_url":"https://api.github.com/repos/PolymerElements/paper-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/paper-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/paper-input/teams","hooks_url":"https://api.github.com/repos/PolymerElements/paper-input/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/paper-input/events","assignees_url":"https://api.github.com/repos/PolymerElements/paper-input/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/paper-input/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/paper-input/tags","blobs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/paper-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/paper-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/paper-input/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/paper-input/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/paper-input/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/paper-input/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/paper-input/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/paper-input/subscription","commits_url":"https://api.github.com/repos/PolymerElements/paper-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/paper-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/paper-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/paper-input/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/paper-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/paper-input/merges","archive_url":"https://api.github.com/repos/PolymerElements/paper-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/paper-input/downloads","issues_url":"https://api.github.com/repos/PolymerElements/paper-input/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/paper-input/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/paper-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/paper-input/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/paper-input/releases{/id}","created_at":"2015-04-21T00:40:05Z","updated_at":"2015-06-01T10:10:58Z","pushed_at":"2015-06-08T22:24:19Z","git_url":"git://github.com/PolymerElements/paper-input.git","ssh_url":"git@github.com:PolymerElements/paper-input.git","clone_url":"https://github.com/PolymerElements/paper-input.git","svn_url":"https://github.com/PolymerElements/paper-input","homepage":null,"size":930,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":15,"forks":9,"open_issues":15,"watchers":3,"default_branch":"master"}},"base":{"label":"PolymerElements:master","ref":"master","sha":"9adead5b3eda0a64d3e40a1b1f1420e55cfa70cc","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":34294743,"name":"paper-input","full_name":"PolymerElements/paper-input","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/paper-input","description":"A Material Design text field","fork":false,"url":"https://api.github.com/repos/PolymerElements/paper-input","forks_url":"https://api.github.com/repos/PolymerElements/paper-input/forks","keys_url":"https://api.github.com/repos/PolymerElements/paper-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/paper-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/paper-input/teams","hooks_url":"https://api.github.com/repos/PolymerElements/paper-input/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/paper-input/events","assignees_url":"https://api.github.com/repos/PolymerElements/paper-input/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/paper-input/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/paper-input/tags","blobs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/paper-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/paper-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/paper-input/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/paper-input/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/paper-input/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/paper-input/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/paper-input/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/paper-input/subscription","commits_url":"https://api.github.com/repos/PolymerElements/paper-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/paper-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/paper-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/paper-input/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/paper-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/paper-input/merges","archive_url":"https://api.github.com/repos/PolymerElements/paper-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/paper-input/downloads","issues_url":"https://api.github.com/repos/PolymerElements/paper-input/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/paper-input/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/paper-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/paper-input/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/paper-input/releases{/id}","created_at":"2015-04-21T00:40:05Z","updated_at":"2015-06-01T10:10:58Z","pushed_at":"2015-06-08T22:24:19Z","git_url":"git://github.com/PolymerElements/paper-input.git","ssh_url":"git@github.com:PolymerElements/paper-input.git","clone_url":"https://github.com/PolymerElements/paper-input.git","svn_url":"https://github.com/PolymerElements/paper-input","homepage":null,"size":930,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":15,"forks":9,"open_issues":15,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70"},"html":{"href":"https://github.com/PolymerElements/paper-input/pull/70"},"issue":{"href":"https://api.github.com/repos/PolymerElements/paper-input/issues/70"},"comments":{"href":"https://api.github.com/repos/PolymerElements/paper-input/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerElements/paper-input/statuses/0bc4aab5707785982184f61162cd961b7ff05bf9"}}}}