DateTimePicker refocuses on TextInput and reopens keyboard in ScrollView with keyboardShouldPersistTaps="handled"
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- android, ios, javascript, react-native
- 領域
- mobile
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- JavaScript
- 星號
- 2.9k
- 分支
- 459
- 平均合併
- 4 天 16 小時
- 30 天內合併 PR
- 5
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react-native-datetimepicker/datetimepicker 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 3/5 1-2 天 新手友好度 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 52/100
-
難度 3/5 1-2 天 新手友好度 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 則留言 ·
-
難度 4/5 3-5 天 新手友好度 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 則留言 ·
查看 react-native-datetimepicker/datetimepicker 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
githubnext/gh-aw-workshop#5522 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
Dayset/ps2-elite-kd#119 ·
-
check:passed logos:add
難度 1/5 1 小時以內 新手友好度 76/100
維護者通常 1 天內回覆
-
area:models enhancement
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
scout
難度 1/5 1-3 小時 新手友好度 88/100
oskarrough/agent-ide#43 ·