DateTimePicker refocuses on TextInput and reopens keyboard in ScrollView with keyboardShouldPersistTaps="handled"
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- android, ios, javascript, react-native
- Domínio
- mobile
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 2.9k
- Forks
- 459
- Merge médio
- 4d 16h
- PRs com merge (30d)
- 5
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de react-native-datetimepicker/datetimepicker
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureAberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 comentários ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 comentário ·
Todas as issues de react-native-datetimepicker/datetimepicker
Issues semelhantes
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish stepTalvez já em andamento @albertteoh assumiu hoje. Abertadocumentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
jaegertracing/jaeger-ui#4739 ·
Mantenedores costumam responder em até 1 dia
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
keepassxreboot/keepassxc-browser#3159 · 1 comentário ·
-
Add: ESP 2 RSAbertaapproved check:passed feeds:add
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 67/100
-
v6: OTP input keeps the rest of a selection when you type over itTalvez já em andamento @thejesh23 assumiu hoje. Abertabug confirmed has-pr js v6
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
twbs/bootstrap#43323 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia