-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Pressing space 2 times "." appears in the Input (double-tapping Double-space feature) #37437
Comments
|
In an uncontrolled component (no |
Yes, I'm looking at the native side. Looking at some methods and trying to get when the "." replaces one of the spaces (when no value prop) and why the "." isn't being replaced when no value prop. Over this method nothing happens
but in this method the string already has the "."
I'm thinking there is something different in between. like: without
with
Still looking into |
@NickGerleman Update: I found that Gets called many times when the So adding a flag so the Do you think it makes sense and should I do a draft PR? Not workingdouble_space_not_working.mp4Fix Workingdouble_space_fix_v1.mp4 |
Fix working with dynamic styling double_space_styling_v1.mp4 |
Fix is working with double_space_shortcut_v1.mp4 |
If you think you have a solution I would recommend starting with a draft PR so someone on the team can take a look, with the context around of the functions, lines, etc you are mentioning 🙂. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Do you still experience this issue? I have four years of experience maintaining facebook/react-native and I specialize in the Text and TextInput components. I currently have 58 facebook/react-native PRs. If you still experience this issue, I will prepare a patched release with the fix. Thanks a lot |
@fabriziobertoglio1987 Hey, yes it is still an issue, and I created a PR with some integration tests: #39385 |
@fabOnReact Can you help on the review of the PR? #39385 |
This is still an issue. |
Description
On iOS, I'm encountering an issue with the TextInput component in React Native. When using the "value" prop and typing two consecutive spaces, a dot is not being automatically added. However, if I remove the "value" prop, the double-space feature works as expected. Additionally, it works correctly when I keep (or remove) the "value" prop and set the "multiline" prop to "true".
I have attempted to investigate the source code to understand where the space is replaced by the dot, but I couldn't locate the specific implementation. Furthermore, I'm unsure about the differences between the MultilineInput and SinglelineInput components and whether UITextField and UITextView behave differently internally.
I would appreciate guidance on where to look in the source code or clarification on whether this behavior is intentional and not a bug.
Here is where the conversation started: Expensify/App#17153
Also found that this was reported some time ago: #22078
On web it works
React Native Version
0.71.0
Output of
npx react-native info
System:
OS: macOS 12.6.5
CPU: (10) arm64 Apple M1 Pro
Memory: 96.69 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.14.0/bin/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
Watchman: 2023.04.03.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /Users/eduardograciano/.rbenv/shims/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.1 AI-221.6008.13.2211.9619390
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@expensify/react-native: 0.71.2-alpha.3
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@educallstackdev/bug-double-space-textinput
The text was updated successfully, but these errors were encountered: