{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/6481","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/6481/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/6481/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/6481/events","html_url":"https://github.com/facebook/react-native/pull/6481","id":141194879,"number":6481,"title":"Fix text input scroll when status bar is translucent","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-16T07:21:37Z","updated_at":"2016-03-16T07:27:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/6481","html_url":"https://github.com/facebook/react-native/pull/6481","diff_url":"https://github.com/facebook/react-native/pull/6481.diff","patch_url":"https://github.com/facebook/react-native/pull/6481.patch"},"body":"Changed the implementation of `setTranslucent` because the old one used the view flag SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN which has the sad side effect of making the ScrollViews not adjust properly when the keyboard is opened. Instead I use `setOnApplyWindowInsetsListener` to hook in the insets calculation process and consume the top offset so the decor view doesn't add top padding for the status bar.\r\n\r\nI also limited the translucent prop to API 21+ because `setOnApplyWindowInsetsListener` is not available before that and anyway the translucent prop is only useful with a semi-transparent status bar color which only works on API 21+.\r\n \r\n**Test plan**\r\nReproduced the bug using this code in UIExplorer.\r\nhttps://gist.github.com/janicduplessis/217b9994e35f960a1793\r\n\r\nTapping a text field that would be hidden by the soft keyboard should scroll the view so it is not hidden.\r\n\r\nAlso tested that setting the translucent prop on and off still works as before.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/197195510","html_url":"https://github.com/facebook/react-native/pull/6481#issuecomment-197195510","issue_url":"https://api.github.com/repos/facebook/react-native/issues/6481","id":197195510,"user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T07:27:00Z","updated_at":"2016-03-16T07:27:00Z","body":"cc @mkonicek @julianocomg"}}