{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/35982044","id":35982044,"diff_hunk":"@@ -35,8 +35,14 @@\n \t<?php if (($this->params->get('logindescription_show') == 1 && str_replace(' ', '', $this->params->get('login_description')) != '') || $this->params->get('login_image') != '') : ?>\n \t</div>\n \t<?php endif; ?>\n+\t\n+\t<script type=\"text/javascript\">\n+\t\tjQuery(function($) {\n+\t\t\t$( \"#form-login input[name='username']\" ).focus();\n+\t\t});\n+\t</script>","path":"components/com_users/views/login/tmpl/default_login.php","position":9,"original_position":9,"commit_id":"b606b43f4c8fcb0fa9b9be8b053ef06a5c23d280","original_commit_id":"b606b43f4c8fcb0fa9b9be8b053ef06a5c23d280","user":{"login":"justinherrin","id":13225615,"avatar_url":"https://avatars.githubusercontent.com/u/13225615?v=3","gravatar_id":"","url":"https://api.github.com/users/justinherrin","html_url":"https://github.com/justinherrin","followers_url":"https://api.github.com/users/justinherrin/followers","following_url":"https://api.github.com/users/justinherrin/following{/other_user}","gists_url":"https://api.github.com/users/justinherrin/gists{/gist_id}","starred_url":"https://api.github.com/users/justinherrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinherrin/subscriptions","organizations_url":"https://api.github.com/users/justinherrin/orgs","repos_url":"https://api.github.com/users/justinherrin/repos","events_url":"https://api.github.com/users/justinherrin/events{/privacy}","received_events_url":"https://api.github.com/users/justinherrin/received_events","type":"User","site_admin":false},"body":"Thank you @dgt41 for pointing that out. As mentioned previously in the comments, it seems to be easier to add autofocus=\"true\" to an XML instead of messing around with javascript/php code.","created_at":"2015-07-31T15:06:17Z","updated_at":"2015-07-31T15:06:17Z","html_url":"https://github.com/joomla/joomla-cms/pull/7601#discussion_r35982044","pull_request_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601","_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/35982044"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/7601#discussion_r35982044"},"pull_request":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601","id":41340884,"html_url":"https://github.com/joomla/joomla-cms/pull/7601","diff_url":"https://github.com/joomla/joomla-cms/pull/7601.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/7601.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7601","number":7601,"state":"open","locked":false,"title":"Adding Autofocus to Frontend Login Component Form","user":{"login":"justinherrin","id":13225615,"avatar_url":"https://avatars.githubusercontent.com/u/13225615?v=3","gravatar_id":"","url":"https://api.github.com/users/justinherrin","html_url":"https://github.com/justinherrin","followers_url":"https://api.github.com/users/justinherrin/followers","following_url":"https://api.github.com/users/justinherrin/following{/other_user}","gists_url":"https://api.github.com/users/justinherrin/gists{/gist_id}","starred_url":"https://api.github.com/users/justinherrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinherrin/subscriptions","organizations_url":"https://api.github.com/users/justinherrin/orgs","repos_url":"https://api.github.com/users/justinherrin/repos","events_url":"https://api.github.com/users/justinherrin/events{/privacy}","received_events_url":"https://api.github.com/users/justinherrin/received_events","type":"User","site_admin":false},"body":"Just like the /administrator login screen, this will make the Username field be autofocus and ready to type in to. This is for the frontend com_users login view.","created_at":"2015-07-31T13:49:26Z","updated_at":"2015-07-31T15:06:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba9c3f3d2ca29f523516119bb95f572f1e7c6c21","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7601/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/b606b43f4c8fcb0fa9b9be8b053ef06a5c23d280","head":{"label":"justinherrin:patch-2","ref":"patch-2","sha":"b606b43f4c8fcb0fa9b9be8b053ef06a5c23d280","user":{"login":"justinherrin","id":13225615,"avatar_url":"https://avatars.githubusercontent.com/u/13225615?v=3","gravatar_id":"","url":"https://api.github.com/users/justinherrin","html_url":"https://github.com/justinherrin","followers_url":"https://api.github.com/users/justinherrin/followers","following_url":"https://api.github.com/users/justinherrin/following{/other_user}","gists_url":"https://api.github.com/users/justinherrin/gists{/gist_id}","starred_url":"https://api.github.com/users/justinherrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinherrin/subscriptions","organizations_url":"https://api.github.com/users/justinherrin/orgs","repos_url":"https://api.github.com/users/justinherrin/repos","events_url":"https://api.github.com/users/justinherrin/events{/privacy}","received_events_url":"https://api.github.com/users/justinherrin/received_events","type":"User","site_admin":false},"repo":{"id":39781843,"name":"joomla-cms","full_name":"justinherrin/joomla-cms","owner":{"login":"justinherrin","id":13225615,"avatar_url":"https://avatars.githubusercontent.com/u/13225615?v=3","gravatar_id":"","url":"https://api.github.com/users/justinherrin","html_url":"https://github.com/justinherrin","followers_url":"https://api.github.com/users/justinherrin/followers","following_url":"https://api.github.com/users/justinherrin/following{/other_user}","gists_url":"https://api.github.com/users/justinherrin/gists{/gist_id}","starred_url":"https://api.github.com/users/justinherrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinherrin/subscriptions","organizations_url":"https://api.github.com/users/justinherrin/orgs","repos_url":"https://api.github.com/users/justinherrin/repos","events_url":"https://api.github.com/users/justinherrin/events{/privacy}","received_events_url":"https://api.github.com/users/justinherrin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justinherrin/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/justinherrin/joomla-cms","forks_url":"https://api.github.com/repos/justinherrin/joomla-cms/forks","keys_url":"https://api.github.com/repos/justinherrin/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justinherrin/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justinherrin/joomla-cms/teams","hooks_url":"https://api.github.com/repos/justinherrin/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/justinherrin/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/justinherrin/joomla-cms/events","assignees_url":"https://api.github.com/repos/justinherrin/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/justinherrin/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/justinherrin/joomla-cms/tags","blobs_url":"https://api.github.com/repos/justinherrin/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justinherrin/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justinherrin/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/justinherrin/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justinherrin/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/justinherrin/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/justinherrin/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/justinherrin/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/justinherrin/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/justinherrin/joomla-cms/subscription","commits_url":"https://api.github.com/repos/justinherrin/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/justinherrin/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/justinherrin/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/justinherrin/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/justinherrin/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/justinherrin/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justinherrin/joomla-cms/merges","archive_url":"https://api.github.com/repos/justinherrin/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justinherrin/joomla-cms/downloads","issues_url":"https://api.github.com/repos/justinherrin/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/justinherrin/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/justinherrin/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/justinherrin/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justinherrin/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/justinherrin/joomla-cms/releases{/id}","created_at":"2015-07-27T15:23:22Z","updated_at":"2015-07-27T15:23:39Z","pushed_at":"2015-07-31T13:46:22Z","git_url":"git://github.com/justinherrin/joomla-cms.git","ssh_url":"git@github.com:justinherrin/joomla-cms.git","clone_url":"https://github.com/justinherrin/joomla-cms.git","svn_url":"https://github.com/justinherrin/joomla-cms","homepage":"http://joomla.org","size":131160,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"staging"}},"base":{"label":"joomla:staging","ref":"staging","sha":"be11290ae498d81833c0cd9f2e305487ff8ccf14","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","created_at":"2011-09-27T02:07:38Z","updated_at":"2015-07-28T22:56:58Z","pushed_at":"2015-07-31T13:49:27Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"http://joomla.org","size":333677,"stargazers_count":1612,"watchers_count":1612,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1793,"mirror_url":null,"open_issues_count":539,"forks":1793,"open_issues":539,"watchers":1612,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/7601"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/7601"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/7601/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7601/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/b606b43f4c8fcb0fa9b9be8b053ef06a5c23d280"}}}}