DateTimePicker refocuses on TextInput and reopens keyboard in ScrollView with keyboardShouldPersistTaps="handled"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, ios, javascript, react-native
- Lĩnh vực
- mobile
Hướng nghiên cứu
Start by tracing how the React Native date picker handles closing and focus on iOS and Android, then look for tests covering interaction with TextInput inside a ScrollView. Reproduce the supplied sample with keyboardShouldPersistTaps="handled"; done means closing the picker leaves the input unfocused and the keyboard closed. The issue names no source files or tests, so locate the relevant entry points first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug report
Summary
If used together with <TextInput /> component placed inside a ScrollView with keyboardShouldPersistTaps set to "handled" It correctly captures the press and closes the keyboard but after closing the picker it refocuses the previous Input and opens the keyboard. Using Keyboard.dismiss while it is open will lead to no effect or a flicker if we introduce some timeout.
Reproducible sample code
import {SafeAreaView, ScrollView, TextInput} from 'react-native';
import RNDateTimePicker from '@react-native-community/datetimepicker';
const App = () => {
return (
<TextInput
placeholder="text2"
style={{padding: 16, marginTop: 16, backgroundColor: '#dddddd'}}
/>
<RNDateTimePicker value={new Date()} />
);
};
export default App;
Steps to reproduce
- Focus the
- Click on the DatePicker
- Click outside the DatePicker to close it
- TextInput is focused again and Keyboard opens
Describe what you expected to happen:
- Focus the
- Click on the DatePicker
- Click outside the DatePicker to close it
- No autofocusing or keyboard opening
Environment info
npx react-native info output:
System:
OS: macOS 12.6.5
CPU: (8) arm64 Apple M1 Pro
Memory: 153.47 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
Watchman: 2022.10.31.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9971841
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.7 => 0.69.7
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
datetimepicker version: 7.4.1
iOS / Android version: 16.2
- Ngôn ngữ chính
- JavaScript
- Star
- 2.9k
- Fork
- 459
- Merge trung bình
- 4 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react-native-datetimepicker/datetimepicker
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 bình luận ·
Tất cả issue của react-native-datetimepicker/datetimepicker
Issue tương tự
-
chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
idean3885/claude-ops-agent#910 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
S: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
oskarrough/agent-ide#29 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Trinitas TV LogoĐang mởcheck:passed logos:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
WikiEducationFoundation/WikiEduDashboard#7258 ·
Maintainer thường phản hồi trong vòng 1 ngày