callstack / callstack/react-native-paper

Modals on iOS do not respond to the presence of the on-screen keyboard

Đang mở
#4,218 17 bình luận 3 reaction 0 người được giao Xem trên GitHub
bug Modal
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.2k
Merge trung bình
5 ngày 23 giờ
Pull request đã merge (30 ngày)
12

Mô tả

### Current behaviour
On web and Android, the Modal component respects the state of the keyboard, adjusting it's height accordingly. On iOS, however, the Modal does not move up when the keyboard is opened.

This issue is likely related to [2172](https://github.com/callstack/react-native-paper/issues/2172)

### Expected behaviour
The Modal component should respect the positions of the keyboard and respond accordingly on all platforms.

### How to reproduce?
1. Add a Modal component inside a Portal component.
2. Add content to the Modal component and open the Modal.
3. Open the device on-screen keyboard on an iOS device.
4. Notice how the Modal doesn't respond (move up) to accommodate the keyboard, even though there is empty space available above the modal.

### Preview
iOS:
![image](https://github.com/callstack/react-native-paper/assets/25905330/ba086873-7684-4754-924c-d3992e5f7690)

Android:
![image](https://github.com/callstack/react-native-paper/assets/25905330/91c79e81-6c68-4bb4-b7e8-dd6682963bde)

### What have you tried so far?
We're currently following the workaround listed [here](https://github.com/callstack/react-native-paper/issues/2172#issuecomment-725769818).

### Your Environment

| software | version
| --------------------- | -------
| ios | x
| android | x
| react-native | 0.71.14
| react-native-paper | 5.11.2
| node | 20.9.0
| npm or yarn | 10.1.0
| expo sdk | 48.0.20

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

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

Hướng nghiên cứu

Tái hiện vấn đề với một React Native Paper Modal bên trong một Portal trên thiết bị iOS, làm theo bốn bước trong báo cáo. So sánh hành vi trên iOS với Android và workaround được thảo luận trong issue 2172. Được xem là hoàn tất khi Modal di chuyển để thích ứng với bàn phím trên màn hình khi còn đủ không gian, mà không gây hồi quy cho hành vi trên web hoặc Android.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
react-native, typescript
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

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.