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

Wrong bottom inset on Android when app goes background

Aberta
#638 13 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
2.8k
Forks
258
Merge médio
3d 1h
PRs com merge (30d)
2

Descrição

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",
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.