appandflow / appandflow/react-native-safe-area-context

Wrong bottom inset on Android when app goes background

未关闭
#638 13 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
2.8k
派生
258
平均合并
3 天 1 小时
30 天内合并 PR
2

描述

When the app goes in background mode, `` triggers a re-render with a wrong bottom inset value.

```
const MyScreen = () => {

const renderNavTabBarWithInsets = (insets: EdgeInsets|null) => {
if (__DEV__) {
// I get {"bottom": 0, "left": 0, "right": 0, "top": 33} on my Samsung S21
// except when going in background mode, it re-renders with
// {"bottom": 48, "left": 0, "right": 0, "top": 33}
console.debug('renderNavTabBarWithInsets ',insets);
}
return (<>);
);
}

return (

{renderNavTabBarWithInsets}

);
}
```

My setup:

```
"react": "18.3.1",
"react-native": "0.75.5",
"react-native-safe-area-context": "5.3.0",
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。