-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RN parity: showSoftInputOnFocus property of <TextInput /> is not supported #2421
Comments
I think what we should do instead is do the mapping to inputMode in React Native. See facebook/react-native#34460 |
#35228) Summary: This PR updates `inputMode` prop from the `TextInput` component to map the `none` option to `showSoftInputOnFocus={false}` as suggested by necolas here -> #34460 (comment). This change makes the inputMode API behaves a bit more similarly across platforms. Related to necolas/react-native-web#2421 ## Changelog [General] [Changed] - Update TextInput inputMode to map "none" to showSoftInputOnFocus ## Test Plan 1. Open the RNTester app and navigate to the TextInput page 2. Test the `TextInput` component through the `Input modes` section https://user-images.githubusercontent.com/11707729/200218435-6a33b319-e989-4086-aac3-506546982b38.mov Pull Request resolved: #35228 Reviewed By: lunaleaps, necolas Differential Revision: D41081876 Pulled By: jacdebug fbshipit-source-id: cc634c3723647d8950bf2cfe67be70d0fbd488a6
Support for |
@necolas do we have an estimated date for the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
No estimate |
Using |
facebook#35228) Summary: This PR updates `inputMode` prop from the `TextInput` component to map the `none` option to `showSoftInputOnFocus={false}` as suggested by necolas here -> facebook#34460 (comment). This change makes the inputMode API behaves a bit more similarly across platforms. Related to necolas/react-native-web#2421 ## Changelog [General] [Changed] - Update TextInput inputMode to map "none" to showSoftInputOnFocus ## Test Plan 1. Open the RNTester app and navigate to the TextInput page 2. Test the `TextInput` component through the `Input modes` section https://user-images.githubusercontent.com/11707729/200218435-6a33b319-e989-4086-aac3-506546982b38.mov Pull Request resolved: facebook#35228 Reviewed By: lunaleaps, necolas Differential Revision: D41081876 Pulled By: jacdebug fbshipit-source-id: cc634c3723647d8950bf2cfe67be70d0fbd488a6
Is there an existing issue for this?
Describe the issue
In https://reactnative.dev/docs/textinput, there's the
showSoftInputOnFocus
property thatwill prevent the soft keyboard from showing when the field is focused
, but react-native-web does not support this yet.Expected behavior
showSoftInputOnFocus
property of<TextInput />
works correctlySteps to reproduce
TextInput
withshowSoftInputOnFocus=false
Test case
https://codesandbox.io/s/runtime-paper-lgmxb3
Additional comments
Since
react-native-web
does not supportshowSoftInputOnFocus
yet, we need to make an update to support itIn
https://github.com/Expensify/react-native-web
->packages/react-native-web/src/exports/TextInput/index.js
I can open a PR for this once this issue proposal is accepted.
Thanks!
cc @necolas
The text was updated successfully, but these errors were encountered: