{"action":"created","comment":{"url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/comments/218934040","pull_request_review_id":156984225,"id":218934040,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODkzNDA0MA==","diff_hunk":"@@ -137,9 +137,16 @@ class SafeView extends Component {\n     );\n   }\n \n-  _onLayout = (...args) => {\n+  _onLayout = (info, ...args) => {\n     if (!this.view) return;\n+    if (!info || !info.nativeEvent) {\n+      if (this.props.onLayout) {\n+        this.props.onLayout(...args);","path":"index.js","position":9,"original_position":9,"commit_id":"ded0b93501f2c46124eaa40172a6e43cbe257130","original_commit_id":"ded0b93501f2c46124eaa40172a6e43cbe257130","user":{"login":"brentvatne","id":90494,"node_id":"MDQ6VXNlcjkwNDk0","avatar_url":"https://avatars2.githubusercontent.com/u/90494?v=4","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"body":"we need to pass the `info` var through here. i'd call it `e` or `event` instead, also. to see why it's necessary to pass it through have a look at https://snack.expo.io/@notbrent/thrilled-pizza - run it and then look at logs, you'll see this:\r\n\r\n<img width=\"902\" alt=\"screen shot 2018-09-19 at 12 26 43 pm\" src=\"https://user-images.githubusercontent.com/90494/45776297-5adc9a80-bc07-11e8-9934-b266c292b542.png\">\r\n","created_at":"2018-09-19T19:27:24Z","updated_at":"2018-09-19T19:35:16Z","html_url":"https://github.com/react-community/react-native-safe-area-view/pull/42#discussion_r218934040","pull_request_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/comments/218934040"},"html":{"href":"https://github.com/react-community/react-native-safe-area-view/pull/42#discussion_r218934040"},"pull_request":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42","id":213550312,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNTUwMzEy","html_url":"https://github.com/react-community/react-native-safe-area-view/pull/42","diff_url":"https://github.com/react-community/react-native-safe-area-view/pull/42.diff","patch_url":"https://github.com/react-community/react-native-safe-area-view/pull/42.patch","issue_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues/42","number":42,"state":"open","locked":false,"title":"Use nativeEvent.layout in onLayout, instead of buggy measureInWindow","user":{"login":"JelteF","id":1162278,"node_id":"MDQ6VXNlcjExNjIyNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1162278?v=4","gravatar_id":"","url":"https://api.github.com/users/JelteF","html_url":"https://github.com/JelteF","followers_url":"https://api.github.com/users/JelteF/followers","following_url":"https://api.github.com/users/JelteF/following{/other_user}","gists_url":"https://api.github.com/users/JelteF/gists{/gist_id}","starred_url":"https://api.github.com/users/JelteF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JelteF/subscriptions","organizations_url":"https://api.github.com/users/JelteF/orgs","repos_url":"https://api.github.com/users/JelteF/repos","events_url":"https://api.github.com/users/JelteF/events{/privacy}","received_events_url":"https://api.github.com/users/JelteF/received_events","type":"User","site_admin":false},"body":"On Android with Expo (and its default translucent statusbar) the `touchesTop`\ndetection is incorrect. This is because `measureInWindow` has a bug that makes\nits behaviour inconsistent with other platforms:\nhttps://github.com/facebook/react-native/issues/19497.\n\nThis PR replaces the usage of measureInWindow with the use of\nnativeEvent.layout (which is the workaround provided in the issue linked\nabove). This makes `touchesTop` detection work for android correctly so\n`forceInset={{ top: 'always' }}` doesn't have to be provided anymore.","created_at":"2018-09-06T09:23:05Z","updated_at":"2018-09-19T19:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3654e25aa8f2329de20fba8c207b2f9ae271a2b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42/commits","review_comments_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42/comments","review_comment_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/comments{/number}","comments_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues/42/comments","statuses_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/statuses/ded0b93501f2c46124eaa40172a6e43cbe257130","head":{"label":"JelteF:stop-using-measureInWindow","ref":"stop-using-measureInWindow","sha":"ded0b93501f2c46124eaa40172a6e43cbe257130","user":{"login":"JelteF","id":1162278,"node_id":"MDQ6VXNlcjExNjIyNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1162278?v=4","gravatar_id":"","url":"https://api.github.com/users/JelteF","html_url":"https://github.com/JelteF","followers_url":"https://api.github.com/users/JelteF/followers","following_url":"https://api.github.com/users/JelteF/following{/other_user}","gists_url":"https://api.github.com/users/JelteF/gists{/gist_id}","starred_url":"https://api.github.com/users/JelteF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JelteF/subscriptions","organizations_url":"https://api.github.com/users/JelteF/orgs","repos_url":"https://api.github.com/users/JelteF/repos","events_url":"https://api.github.com/users/JelteF/events{/privacy}","received_events_url":"https://api.github.com/users/JelteF/received_events","type":"User","site_admin":false},"repo":{"id":147648264,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc2NDgyNjQ=","name":"react-native-safe-area-view","full_name":"JelteF/react-native-safe-area-view","private":false,"owner":{"login":"JelteF","id":1162278,"node_id":"MDQ6VXNlcjExNjIyNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1162278?v=4","gravatar_id":"","url":"https://api.github.com/users/JelteF","html_url":"https://github.com/JelteF","followers_url":"https://api.github.com/users/JelteF/followers","following_url":"https://api.github.com/users/JelteF/following{/other_user}","gists_url":"https://api.github.com/users/JelteF/gists{/gist_id}","starred_url":"https://api.github.com/users/JelteF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JelteF/subscriptions","organizations_url":"https://api.github.com/users/JelteF/orgs","repos_url":"https://api.github.com/users/JelteF/repos","events_url":"https://api.github.com/users/JelteF/events{/privacy}","received_events_url":"https://api.github.com/users/JelteF/received_events","type":"User","site_admin":false},"html_url":"https://github.com/JelteF/react-native-safe-area-view","description":"JS only version of SafeAreaView for supporting iPhone X safe area insets.","fork":true,"url":"https://api.github.com/repos/JelteF/react-native-safe-area-view","forks_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/forks","keys_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/teams","hooks_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/hooks","issue_events_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/issues/events{/number}","events_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/events","assignees_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/assignees{/user}","branches_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/branches{/branch}","tags_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/tags","blobs_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/git/refs{/sha}","trees_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/statuses/{sha}","languages_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/languages","stargazers_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/stargazers","contributors_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/contributors","subscribers_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/subscribers","subscription_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/subscription","commits_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/commits{/sha}","git_commits_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/git/commits{/sha}","comments_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/comments{/number}","issue_comment_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/issues/comments{/number}","contents_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/contents/{+path}","compare_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/merges","archive_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/downloads","issues_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/issues{/number}","pulls_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/pulls{/number}","milestones_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/milestones{/number}","notifications_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/labels{/name}","releases_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/releases{/id}","deployments_url":"https://api.github.com/repos/JelteF/react-native-safe-area-view/deployments","created_at":"2018-09-06T09:14:27Z","updated_at":"2018-09-06T09:14:29Z","pushed_at":"2018-09-06T09:18:17Z","git_url":"git://github.com/JelteF/react-native-safe-area-view.git","ssh_url":"git@github.com:JelteF/react-native-safe-area-view.git","clone_url":"https://github.com/JelteF/react-native-safe-area-view.git","svn_url":"https://github.com/JelteF/react-native-safe-area-view","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"react-community:master","ref":"master","sha":"1132007ab9173bcb60c2141570f95030b3a4038b","user":{"login":"react-community","id":24483500,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDgzNTAw","avatar_url":"https://avatars3.githubusercontent.com/u/24483500?v=4","gravatar_id":"","url":"https://api.github.com/users/react-community","html_url":"https://github.com/react-community","followers_url":"https://api.github.com/users/react-community/followers","following_url":"https://api.github.com/users/react-community/following{/other_user}","gists_url":"https://api.github.com/users/react-community/gists{/gist_id}","starred_url":"https://api.github.com/users/react-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/react-community/subscriptions","organizations_url":"https://api.github.com/users/react-community/orgs","repos_url":"https://api.github.com/users/react-community/repos","events_url":"https://api.github.com/users/react-community/events{/privacy}","received_events_url":"https://api.github.com/users/react-community/received_events","type":"Organization","site_admin":false},"repo":{"id":109064065,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkwNjQwNjU=","name":"react-native-safe-area-view","full_name":"react-community/react-native-safe-area-view","private":false,"owner":{"login":"react-community","id":24483500,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NDgzNTAw","avatar_url":"https://avatars3.githubusercontent.com/u/24483500?v=4","gravatar_id":"","url":"https://api.github.com/users/react-community","html_url":"https://github.com/react-community","followers_url":"https://api.github.com/users/react-community/followers","following_url":"https://api.github.com/users/react-community/following{/other_user}","gists_url":"https://api.github.com/users/react-community/gists{/gist_id}","starred_url":"https://api.github.com/users/react-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/react-community/subscriptions","organizations_url":"https://api.github.com/users/react-community/orgs","repos_url":"https://api.github.com/users/react-community/repos","events_url":"https://api.github.com/users/react-community/events{/privacy}","received_events_url":"https://api.github.com/users/react-community/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/react-community/react-native-safe-area-view","description":"JS only version of SafeAreaView for supporting iPhone X safe area insets.","fork":false,"url":"https://api.github.com/repos/react-community/react-native-safe-area-view","forks_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/forks","keys_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/keys{/key_id}","collaborators_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/teams","hooks_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/hooks","issue_events_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues/events{/number}","events_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/events","assignees_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/assignees{/user}","branches_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/branches{/branch}","tags_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/tags","blobs_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/git/refs{/sha}","trees_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/git/trees{/sha}","statuses_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/statuses/{sha}","languages_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/languages","stargazers_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/stargazers","contributors_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/contributors","subscribers_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/subscribers","subscription_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/subscription","commits_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/commits{/sha}","git_commits_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/git/commits{/sha}","comments_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/comments{/number}","issue_comment_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues/comments{/number}","contents_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/contents/{+path}","compare_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/compare/{base}...{head}","merges_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/merges","archive_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/downloads","issues_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues{/number}","pulls_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls{/number}","milestones_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/milestones{/number}","notifications_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/labels{/name}","releases_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/releases{/id}","deployments_url":"https://api.github.com/repos/react-community/react-native-safe-area-view/deployments","created_at":"2017-10-31T23:43:48Z","updated_at":"2018-09-19T18:16:40Z","pushed_at":"2018-09-19T18:16:38Z","git_url":"git://github.com/react-community/react-native-safe-area-view.git","ssh_url":"git@github.com:react-community/react-native-safe-area-view.git","clone_url":"https://github.com/react-community/react-native-safe-area-view.git","svn_url":"https://github.com/react-community/react-native-safe-area-view","homepage":null,"size":78,"stargazers_count":236,"watchers_count":236,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":65,"open_issues":10,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42"},"html":{"href":"https://github.com/react-community/react-native-safe-area-view/pull/42"},"issue":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues/42"},"comments":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/react-community/react-native-safe-area-view/statuses/ded0b93501f2c46124eaa40172a6e43cbe257130"}},"author_association":"NONE"}}
{"actor":{"display_login":"brentvatne"}}