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

Wrong bottom inset on Android when app goes background

Đang mở
#638 13 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
2.8k
Fork
258
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
2

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.