{"action":"closed","number":5,"pull_request":{"url":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/5","id":211775135,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNzc1MTM1","html_url":"https://github.com/okonet/react-simple-focus-within/pull/5","diff_url":"https://github.com/okonet/react-simple-focus-within/pull/5.diff","patch_url":"https://github.com/okonet/react-simple-focus-within/pull/5.patch","issue_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/5","number":5,"state":"closed","locked":false,"title":"fix(Safari): Do not rely on `:focus-within` CSS selector","user":{"login":"okonet","id":11071,"node_id":"MDQ6VXNlcjExMDcx","avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"body":" instead of `querySelector(':focus-within')`\r\n\r\n### Explanation\r\n\r\nChecking with `querySelector(':focus-within')` only works if the element has focus.\r\nUnfortunately, according to the spec `onBlur` event occurs after the blur already happened\r\nso the selector always returns `null` in Safari.\r\n\r\n### Solution\r\n\r\nThis commit rewrites the logic to not rely on the CSS selector anymore. This also makes it\r\nwork in browsers that doesn't support `:focus-within` yet without the need of polyfill.\r\n\r\nFixes #4 ","created_at":"2018-08-29T14:30:39Z","updated_at":"2018-08-30T09:44:10Z","closed_at":"2018-08-30T09:44:10Z","merged_at":"2018-08-30T09:44:10Z","merge_commit_sha":"0516001c771545aa566b157ff84144935e0feb44","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/5/commits","review_comments_url":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/5/comments","review_comment_url":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/comments{/number}","comments_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/5/comments","statuses_url":"https://api.github.com/repos/okonet/react-simple-focus-within/statuses/c9671a7e463e3cf256dc08306059d732ca1e1a39","head":{"label":"okonet:fix-safari","ref":"fix-safari","sha":"c9671a7e463e3cf256dc08306059d732ca1e1a39","user":{"login":"okonet","id":11071,"node_id":"MDQ6VXNlcjExMDcx","avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"repo":{"id":144580540,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ1ODA1NDA=","name":"react-simple-focus-within","full_name":"okonet/react-simple-focus-within","owner":{"login":"okonet","id":11071,"node_id":"MDQ6VXNlcjExMDcx","avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/okonet/react-simple-focus-within","description":"The missing JS API of the CSS `:focus-within` for React","fork":false,"url":"https://api.github.com/repos/okonet/react-simple-focus-within","forks_url":"https://api.github.com/repos/okonet/react-simple-focus-within/forks","keys_url":"https://api.github.com/repos/okonet/react-simple-focus-within/keys{/key_id}","collaborators_url":"https://api.github.com/repos/okonet/react-simple-focus-within/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/okonet/react-simple-focus-within/teams","hooks_url":"https://api.github.com/repos/okonet/react-simple-focus-within/hooks","issue_events_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/events{/number}","events_url":"https://api.github.com/repos/okonet/react-simple-focus-within/events","assignees_url":"https://api.github.com/repos/okonet/react-simple-focus-within/assignees{/user}","branches_url":"https://api.github.com/repos/okonet/react-simple-focus-within/branches{/branch}","tags_url":"https://api.github.com/repos/okonet/react-simple-focus-within/tags","blobs_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/refs{/sha}","trees_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/trees{/sha}","statuses_url":"https://api.github.com/repos/okonet/react-simple-focus-within/statuses/{sha}","languages_url":"https://api.github.com/repos/okonet/react-simple-focus-within/languages","stargazers_url":"https://api.github.com/repos/okonet/react-simple-focus-within/stargazers","contributors_url":"https://api.github.com/repos/okonet/react-simple-focus-within/contributors","subscribers_url":"https://api.github.com/repos/okonet/react-simple-focus-within/subscribers","subscription_url":"https://api.github.com/repos/okonet/react-simple-focus-within/subscription","commits_url":"https://api.github.com/repos/okonet/react-simple-focus-within/commits{/sha}","git_commits_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/commits{/sha}","comments_url":"https://api.github.com/repos/okonet/react-simple-focus-within/comments{/number}","issue_comment_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/comments{/number}","contents_url":"https://api.github.com/repos/okonet/react-simple-focus-within/contents/{+path}","compare_url":"https://api.github.com/repos/okonet/react-simple-focus-within/compare/{base}...{head}","merges_url":"https://api.github.com/repos/okonet/react-simple-focus-within/merges","archive_url":"https://api.github.com/repos/okonet/react-simple-focus-within/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/okonet/react-simple-focus-within/downloads","issues_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues{/number}","pulls_url":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls{/number}","milestones_url":"https://api.github.com/repos/okonet/react-simple-focus-within/milestones{/number}","notifications_url":"https://api.github.com/repos/okonet/react-simple-focus-within/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/okonet/react-simple-focus-within/labels{/name}","releases_url":"https://api.github.com/repos/okonet/react-simple-focus-within/releases{/id}","deployments_url":"https://api.github.com/repos/okonet/react-simple-focus-within/deployments","created_at":"2018-08-13T13:02:02Z","updated_at":"2018-08-29T10:37:15Z","pushed_at":"2018-08-30T09:44:10Z","git_url":"git://github.com/okonet/react-simple-focus-within.git","ssh_url":"git@github.com:okonet/react-simple-focus-within.git","clone_url":"https://github.com/okonet/react-simple-focus-within.git","svn_url":"https://github.com/okonet/react-simple-focus-within","homepage":"https://react-simple-focus-within.netlify.com","size":261,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":22,"default_branch":"master"}},"base":{"label":"okonet:master","ref":"master","sha":"24fc6f8c98f46732f825296de4c8425e745ec5b2","user":{"login":"okonet","id":11071,"node_id":"MDQ6VXNlcjExMDcx","avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"repo":{"id":144580540,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ1ODA1NDA=","name":"react-simple-focus-within","full_name":"okonet/react-simple-focus-within","owner":{"login":"okonet","id":11071,"node_id":"MDQ6VXNlcjExMDcx","avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/okonet/react-simple-focus-within","description":"The missing JS API of the CSS `:focus-within` for React","fork":false,"url":"https://api.github.com/repos/okonet/react-simple-focus-within","forks_url":"https://api.github.com/repos/okonet/react-simple-focus-within/forks","keys_url":"https://api.github.com/repos/okonet/react-simple-focus-within/keys{/key_id}","collaborators_url":"https://api.github.com/repos/okonet/react-simple-focus-within/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/okonet/react-simple-focus-within/teams","hooks_url":"https://api.github.com/repos/okonet/react-simple-focus-within/hooks","issue_events_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/events{/number}","events_url":"https://api.github.com/repos/okonet/react-simple-focus-within/events","assignees_url":"https://api.github.com/repos/okonet/react-simple-focus-within/assignees{/user}","branches_url":"https://api.github.com/repos/okonet/react-simple-focus-within/branches{/branch}","tags_url":"https://api.github.com/repos/okonet/react-simple-focus-within/tags","blobs_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/refs{/sha}","trees_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/trees{/sha}","statuses_url":"https://api.github.com/repos/okonet/react-simple-focus-within/statuses/{sha}","languages_url":"https://api.github.com/repos/okonet/react-simple-focus-within/languages","stargazers_url":"https://api.github.com/repos/okonet/react-simple-focus-within/stargazers","contributors_url":"https://api.github.com/repos/okonet/react-simple-focus-within/contributors","subscribers_url":"https://api.github.com/repos/okonet/react-simple-focus-within/subscribers","subscription_url":"https://api.github.com/repos/okonet/react-simple-focus-within/subscription","commits_url":"https://api.github.com/repos/okonet/react-simple-focus-within/commits{/sha}","git_commits_url":"https://api.github.com/repos/okonet/react-simple-focus-within/git/commits{/sha}","comments_url":"https://api.github.com/repos/okonet/react-simple-focus-within/comments{/number}","issue_comment_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/comments{/number}","contents_url":"https://api.github.com/repos/okonet/react-simple-focus-within/contents/{+path}","compare_url":"https://api.github.com/repos/okonet/react-simple-focus-within/compare/{base}...{head}","merges_url":"https://api.github.com/repos/okonet/react-simple-focus-within/merges","archive_url":"https://api.github.com/repos/okonet/react-simple-focus-within/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/okonet/react-simple-focus-within/downloads","issues_url":"https://api.github.com/repos/okonet/react-simple-focus-within/issues{/number}","pulls_url":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls{/number}","milestones_url":"https://api.github.com/repos/okonet/react-simple-focus-within/milestones{/number}","notifications_url":"https://api.github.com/repos/okonet/react-simple-focus-within/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/okonet/react-simple-focus-within/labels{/name}","releases_url":"https://api.github.com/repos/okonet/react-simple-focus-within/releases{/id}","deployments_url":"https://api.github.com/repos/okonet/react-simple-focus-within/deployments","created_at":"2018-08-13T13:02:02Z","updated_at":"2018-08-29T10:37:15Z","pushed_at":"2018-08-30T09:44:10Z","git_url":"git://github.com/okonet/react-simple-focus-within.git","ssh_url":"git@github.com:okonet/react-simple-focus-within.git","clone_url":"https://github.com/okonet/react-simple-focus-within.git","svn_url":"https://github.com/okonet/react-simple-focus-within","homepage":"https://react-simple-focus-within.netlify.com","size":261,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/5"},"html":{"href":"https://github.com/okonet/react-simple-focus-within/pull/5"},"issue":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/5"},"comments":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/okonet/react-simple-focus-within/statuses/c9671a7e463e3cf256dc08306059d732ca1e1a39"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"okonet","id":11071,"node_id":"MDQ6VXNlcjExMDcx","avatar_url":"https://avatars3.githubusercontent.com/u/11071?v=4","gravatar_id":"","url":"https://api.github.com/users/okonet","html_url":"https://github.com/okonet","followers_url":"https://api.github.com/users/okonet/followers","following_url":"https://api.github.com/users/okonet/following{/other_user}","gists_url":"https://api.github.com/users/okonet/gists{/gist_id}","starred_url":"https://api.github.com/users/okonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonet/subscriptions","organizations_url":"https://api.github.com/users/okonet/orgs","repos_url":"https://api.github.com/users/okonet/repos","events_url":"https://api.github.com/users/okonet/events{/privacy}","received_events_url":"https://api.github.com/users/okonet/received_events","type":"User","site_admin":false},"comments":0,"review_comments":3,"maintainer_can_modify":false,"commits":1,"additions":83,"deletions":38,"changed_files":1}}
{"actor":{"display_login":"okonet"}}