{"action":"created","comment":{"url":"https://api.github.com/repos/BorderTech/wcomponents/pulls/comments/122335097","pull_request_review_id":44443569,"id":122335097,"diff_hunk":"@@ -296,24 +296,25 @@ protected boolean beforeHandleRequest(final Request request) {\n \n \t/**\n \t * Perform change logic for this component.\n+\t * <p>Reset focus ONLY if the current Request is an Ajax request. See https://github.com/BorderTech/wcomponents/issues/501.</p>\n \t */\n \tprotected void doHandleChanged() {\n \t\t// If there is an associated action, execute it\n \t\tif (getActionOnChange() != null) {\n \t\t\tfinal ActionEvent event = new ActionEvent(this, getActionCommand(), getActionObject());\n+\t\t\tfinal WComponent currentInput = this;\n \t\t\tRunnable later = new Runnable() {\n \t\t\t\t@Override\n \t\t\t\tpublic void run() {\n \t\t\t\t\tgetActionOnChange().execute(event);\n-\n-\t\t\t\t\tif (isSubmitOnChange() && UIContextHolder.getCurrent().getFocussed() == null) {\n+\t\t\t\t\tif (AjaxHelper.isCurrentAjaxTrigger(currentInput) && UIContextHolder.getCurrent().getFocussed() == null) {","path":"wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractInput.java","position":17,"original_position":17,"commit_id":"559964c7fd0f9eb35a7ec86c1c5c1523d77f2bad","original_commit_id":"559964c7fd0f9eb35a7ec86c1c5c1523d77f2bad","user":{"login":"jonathanaustin","id":11400584,"avatar_url":"https://avatars0.githubusercontent.com/u/11400584?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanaustin","html_url":"https://github.com/jonathanaustin","followers_url":"https://api.github.com/users/jonathanaustin/followers","following_url":"https://api.github.com/users/jonathanaustin/following{/other_user}","gists_url":"https://api.github.com/users/jonathanaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanaustin/subscriptions","organizations_url":"https://api.github.com/users/jonathanaustin/orgs","repos_url":"https://api.github.com/users/jonathanaustin/repos","events_url":"https://api.github.com/users/jonathanaustin/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanaustin/received_events","type":"User","site_admin":false},"body":"What might be helpful is a new method in `AbstractInput` to check if the input is the current AJAX trigger. This could be useful for many input components that do this check....\r\n```\r\n     /**\r\n\t *\r\n\t * @return true if this input is the current AJAX trigger\r\n\t */\r\n\tpublic boolean isCurrentAjaxTrigger() {\r\n\t\treturn AjaxHelper.isCurrentAjaxTrigger(this);\r\n\t}\r\n```\r\n\r\nAlso noticed `WTab` has a static method `isCurrentAjaxTrigger`. Might be good to deprecate this and call the AjaxHelper method.\r\n","created_at":"2017-06-15T23:23:15Z","updated_at":"2017-06-15T23:23:15Z","html_url":"https://github.com/BorderTech/wcomponents/pull/1259#discussion_r122335097","pull_request_url":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259","_links":{"self":{"href":"https://api.github.com/repos/BorderTech/wcomponents/pulls/comments/122335097"},"html":{"href":"https://github.com/BorderTech/wcomponents/pull/1259#discussion_r122335097"},"pull_request":{"href":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259"}}},"pull_request":{"url":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259","id":125568704,"html_url":"https://github.com/BorderTech/wcomponents/pull/1259","diff_url":"https://github.com/BorderTech/wcomponents/pull/1259.diff","patch_url":"https://github.com/BorderTech/wcomponents/pull/1259.patch","issue_url":"https://api.github.com/repos/BorderTech/wcomponents/issues/1259","number":1259,"state":"open","locked":false,"title":"Bug fixes","user":{"login":"marksreeves","id":11661938,"avatar_url":"https://avatars3.githubusercontent.com/u/11661938?v=3","gravatar_id":"","url":"https://api.github.com/users/marksreeves","html_url":"https://github.com/marksreeves","followers_url":"https://api.github.com/users/marksreeves/followers","following_url":"https://api.github.com/users/marksreeves/following{/other_user}","gists_url":"https://api.github.com/users/marksreeves/gists{/gist_id}","starred_url":"https://api.github.com/users/marksreeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marksreeves/subscriptions","organizations_url":"https://api.github.com/users/marksreeves/orgs","repos_url":"https://api.github.com/users/marksreeves/repos","events_url":"https://api.github.com/users/marksreeves/events{/privacy}","received_events_url":"https://api.github.com/users/marksreeves/received_events","type":"User","site_admin":false},"body":"Fix #1258\nFix #1257\nFix #1253\nResolve #501\nAddress part of #1255\n\nUpdate eslint and fix a number of JavaScript issues.","created_at":"2017-06-14T11:07:25Z","updated_at":"2017-06-15T23:23:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ced804162e3a725cdedea48b9507f040769197e5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259/commits","review_comments_url":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259/comments","review_comment_url":"https://api.github.com/repos/BorderTech/wcomponents/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BorderTech/wcomponents/issues/1259/comments","statuses_url":"https://api.github.com/repos/BorderTech/wcomponents/statuses/559964c7fd0f9eb35a7ec86c1c5c1523d77f2bad","head":{"label":"marksreeves:autofocus-a11y","ref":"autofocus-a11y","sha":"559964c7fd0f9eb35a7ec86c1c5c1523d77f2bad","user":{"login":"marksreeves","id":11661938,"avatar_url":"https://avatars3.githubusercontent.com/u/11661938?v=3","gravatar_id":"","url":"https://api.github.com/users/marksreeves","html_url":"https://github.com/marksreeves","followers_url":"https://api.github.com/users/marksreeves/followers","following_url":"https://api.github.com/users/marksreeves/following{/other_user}","gists_url":"https://api.github.com/users/marksreeves/gists{/gist_id}","starred_url":"https://api.github.com/users/marksreeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marksreeves/subscriptions","organizations_url":"https://api.github.com/users/marksreeves/orgs","repos_url":"https://api.github.com/users/marksreeves/repos","events_url":"https://api.github.com/users/marksreeves/events{/privacy}","received_events_url":"https://api.github.com/users/marksreeves/received_events","type":"User","site_admin":false},"repo":{"id":42565451,"name":"wcomponents","full_name":"marksreeves/wcomponents","owner":{"login":"marksreeves","id":11661938,"avatar_url":"https://avatars3.githubusercontent.com/u/11661938?v=3","gravatar_id":"","url":"https://api.github.com/users/marksreeves","html_url":"https://github.com/marksreeves","followers_url":"https://api.github.com/users/marksreeves/followers","following_url":"https://api.github.com/users/marksreeves/following{/other_user}","gists_url":"https://api.github.com/users/marksreeves/gists{/gist_id}","starred_url":"https://api.github.com/users/marksreeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marksreeves/subscriptions","organizations_url":"https://api.github.com/users/marksreeves/orgs","repos_url":"https://api.github.com/users/marksreeves/repos","events_url":"https://api.github.com/users/marksreeves/events{/privacy}","received_events_url":"https://api.github.com/users/marksreeves/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marksreeves/wcomponents","description":"Accessible Web UI Framework for Enterprise","fork":true,"url":"https://api.github.com/repos/marksreeves/wcomponents","forks_url":"https://api.github.com/repos/marksreeves/wcomponents/forks","keys_url":"https://api.github.com/repos/marksreeves/wcomponents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marksreeves/wcomponents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marksreeves/wcomponents/teams","hooks_url":"https://api.github.com/repos/marksreeves/wcomponents/hooks","issue_events_url":"https://api.github.com/repos/marksreeves/wcomponents/issues/events{/number}","events_url":"https://api.github.com/repos/marksreeves/wcomponents/events","assignees_url":"https://api.github.com/repos/marksreeves/wcomponents/assignees{/user}","branches_url":"https://api.github.com/repos/marksreeves/wcomponents/branches{/branch}","tags_url":"https://api.github.com/repos/marksreeves/wcomponents/tags","blobs_url":"https://api.github.com/repos/marksreeves/wcomponents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marksreeves/wcomponents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marksreeves/wcomponents/git/refs{/sha}","trees_url":"https://api.github.com/repos/marksreeves/wcomponents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marksreeves/wcomponents/statuses/{sha}","languages_url":"https://api.github.com/repos/marksreeves/wcomponents/languages","stargazers_url":"https://api.github.com/repos/marksreeves/wcomponents/stargazers","contributors_url":"https://api.github.com/repos/marksreeves/wcomponents/contributors","subscribers_url":"https://api.github.com/repos/marksreeves/wcomponents/subscribers","subscription_url":"https://api.github.com/repos/marksreeves/wcomponents/subscription","commits_url":"https://api.github.com/repos/marksreeves/wcomponents/commits{/sha}","git_commits_url":"https://api.github.com/repos/marksreeves/wcomponents/git/commits{/sha}","comments_url":"https://api.github.com/repos/marksreeves/wcomponents/comments{/number}","issue_comment_url":"https://api.github.com/repos/marksreeves/wcomponents/issues/comments{/number}","contents_url":"https://api.github.com/repos/marksreeves/wcomponents/contents/{+path}","compare_url":"https://api.github.com/repos/marksreeves/wcomponents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marksreeves/wcomponents/merges","archive_url":"https://api.github.com/repos/marksreeves/wcomponents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marksreeves/wcomponents/downloads","issues_url":"https://api.github.com/repos/marksreeves/wcomponents/issues{/number}","pulls_url":"https://api.github.com/repos/marksreeves/wcomponents/pulls{/number}","milestones_url":"https://api.github.com/repos/marksreeves/wcomponents/milestones{/number}","notifications_url":"https://api.github.com/repos/marksreeves/wcomponents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marksreeves/wcomponents/labels{/name}","releases_url":"https://api.github.com/repos/marksreeves/wcomponents/releases{/id}","deployments_url":"https://api.github.com/repos/marksreeves/wcomponents/deployments","created_at":"2015-09-16T04:57:13Z","updated_at":"2016-10-23T22:09:54Z","pushed_at":"2017-06-15T04:19:17Z","git_url":"git://github.com/marksreeves/wcomponents.git","ssh_url":"git@github.com:marksreeves/wcomponents.git","clone_url":"https://github.com/marksreeves/wcomponents.git","svn_url":"https://github.com/marksreeves/wcomponents","homepage":"","size":54227,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"freddie"}},"base":{"label":"BorderTech:freddie","ref":"freddie","sha":"5769d5ef1c63e8b929e0b381bc6a748a123fa708","user":{"login":"BorderTech","id":11400614,"avatar_url":"https://avatars1.githubusercontent.com/u/11400614?v=3","gravatar_id":"","url":"https://api.github.com/users/BorderTech","html_url":"https://github.com/BorderTech","followers_url":"https://api.github.com/users/BorderTech/followers","following_url":"https://api.github.com/users/BorderTech/following{/other_user}","gists_url":"https://api.github.com/users/BorderTech/gists{/gist_id}","starred_url":"https://api.github.com/users/BorderTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BorderTech/subscriptions","organizations_url":"https://api.github.com/users/BorderTech/orgs","repos_url":"https://api.github.com/users/BorderTech/repos","events_url":"https://api.github.com/users/BorderTech/events{/privacy}","received_events_url":"https://api.github.com/users/BorderTech/received_events","type":"Organization","site_admin":false},"repo":{"id":31935307,"name":"wcomponents","full_name":"BorderTech/wcomponents","owner":{"login":"BorderTech","id":11400614,"avatar_url":"https://avatars1.githubusercontent.com/u/11400614?v=3","gravatar_id":"","url":"https://api.github.com/users/BorderTech","html_url":"https://github.com/BorderTech","followers_url":"https://api.github.com/users/BorderTech/followers","following_url":"https://api.github.com/users/BorderTech/following{/other_user}","gists_url":"https://api.github.com/users/BorderTech/gists{/gist_id}","starred_url":"https://api.github.com/users/BorderTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BorderTech/subscriptions","organizations_url":"https://api.github.com/users/BorderTech/orgs","repos_url":"https://api.github.com/users/BorderTech/repos","events_url":"https://api.github.com/users/BorderTech/events{/privacy}","received_events_url":"https://api.github.com/users/BorderTech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BorderTech/wcomponents","description":"Accessible Web UI Framework for Enterprise","fork":false,"url":"https://api.github.com/repos/BorderTech/wcomponents","forks_url":"https://api.github.com/repos/BorderTech/wcomponents/forks","keys_url":"https://api.github.com/repos/BorderTech/wcomponents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BorderTech/wcomponents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BorderTech/wcomponents/teams","hooks_url":"https://api.github.com/repos/BorderTech/wcomponents/hooks","issue_events_url":"https://api.github.com/repos/BorderTech/wcomponents/issues/events{/number}","events_url":"https://api.github.com/repos/BorderTech/wcomponents/events","assignees_url":"https://api.github.com/repos/BorderTech/wcomponents/assignees{/user}","branches_url":"https://api.github.com/repos/BorderTech/wcomponents/branches{/branch}","tags_url":"https://api.github.com/repos/BorderTech/wcomponents/tags","blobs_url":"https://api.github.com/repos/BorderTech/wcomponents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BorderTech/wcomponents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BorderTech/wcomponents/git/refs{/sha}","trees_url":"https://api.github.com/repos/BorderTech/wcomponents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BorderTech/wcomponents/statuses/{sha}","languages_url":"https://api.github.com/repos/BorderTech/wcomponents/languages","stargazers_url":"https://api.github.com/repos/BorderTech/wcomponents/stargazers","contributors_url":"https://api.github.com/repos/BorderTech/wcomponents/contributors","subscribers_url":"https://api.github.com/repos/BorderTech/wcomponents/subscribers","subscription_url":"https://api.github.com/repos/BorderTech/wcomponents/subscription","commits_url":"https://api.github.com/repos/BorderTech/wcomponents/commits{/sha}","git_commits_url":"https://api.github.com/repos/BorderTech/wcomponents/git/commits{/sha}","comments_url":"https://api.github.com/repos/BorderTech/wcomponents/comments{/number}","issue_comment_url":"https://api.github.com/repos/BorderTech/wcomponents/issues/comments{/number}","contents_url":"https://api.github.com/repos/BorderTech/wcomponents/contents/{+path}","compare_url":"https://api.github.com/repos/BorderTech/wcomponents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BorderTech/wcomponents/merges","archive_url":"https://api.github.com/repos/BorderTech/wcomponents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BorderTech/wcomponents/downloads","issues_url":"https://api.github.com/repos/BorderTech/wcomponents/issues{/number}","pulls_url":"https://api.github.com/repos/BorderTech/wcomponents/pulls{/number}","milestones_url":"https://api.github.com/repos/BorderTech/wcomponents/milestones{/number}","notifications_url":"https://api.github.com/repos/BorderTech/wcomponents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BorderTech/wcomponents/labels{/name}","releases_url":"https://api.github.com/repos/BorderTech/wcomponents/releases{/id}","deployments_url":"https://api.github.com/repos/BorderTech/wcomponents/deployments","created_at":"2015-03-10T02:59:08Z","updated_at":"2016-11-17T13:30:33Z","pushed_at":"2017-06-15T03:27:30Z","git_url":"git://github.com/BorderTech/wcomponents.git","ssh_url":"git@github.com:BorderTech/wcomponents.git","clone_url":"https://github.com/BorderTech/wcomponents.git","svn_url":"https://github.com/BorderTech/wcomponents","homepage":"","size":80136,"stargazers_count":14,"watchers_count":14,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":71,"forks":12,"open_issues":71,"watchers":14,"default_branch":"freddie"}},"_links":{"self":{"href":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259"},"html":{"href":"https://github.com/BorderTech/wcomponents/pull/1259"},"issue":{"href":"https://api.github.com/repos/BorderTech/wcomponents/issues/1259"},"comments":{"href":"https://api.github.com/repos/BorderTech/wcomponents/issues/1259/comments"},"review_comments":{"href":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259/comments"},"review_comment":{"href":"https://api.github.com/repos/BorderTech/wcomponents/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BorderTech/wcomponents/pulls/1259/commits"},"statuses":{"href":"https://api.github.com/repos/BorderTech/wcomponents/statuses/559964c7fd0f9eb35a7ec86c1c5c1523d77f2bad"}}}}
{"actor":{"display_login":"jonathanaustin"}}