You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user taps on a TextInput field, we'd like to change the border color and font style so that the user can easily see where they are typing. When changing the border style, the selected text in TextInput remains the same. When changing the font style, the selection is lost and the cursor moves to the end of the TextInput.
React Native version:
$ yarn react-native info
yarn run v1.22.10
$ /Users/apfritts/Software/LovebugAdmin/node_modules/.bin/react-native info
info Fetching system and libraries information...
System:
OS: macOS 11.2.3
CPU: (8) arm64 Apple M1
Memory: 71.77 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.12.0 - /var/folders/_2/w82mgfxd6wbbmv6njlk1fv4m0000gn/T/yarn--1618678732532-0.19761960273155532/node
Yarn: 1.22.10 - /var/folders/_2/w82mgfxd6wbbmv6njlk1fv4m0000gn/T/yarn--1618678732532-0.19761960273155532/yarn
npm: 7.6.3 - ~/.nvm/versions/node/v15.12.0/bin/npm
Watchman: 4.9.0 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/apfritts/.rvm/gems/ruby-2.7.2/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 28, 29
Build Tools: 29.0.2
System Images: android-24 | Google APIs ARM 64 v8a, android-29 | Google APIs Intel x86 Atom_64, android-S | Google Play ARM 64 v8a
Android NDK: 22.1.7171670
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7199119
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_282 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^17.0.2 => 17.0.2
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
✨ Done in 7.06s.
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Launch emulator for iOS
With border and font style changes activated, tap "Next Input"
Notice the cursor moves to the end of the TextInput
Deactivate font style changing.
Tap "Next Input"
Notice the entire text field is selected
Deactivating or activating border style changes have no effect on selection behavior.
Expected Results
I expect the text to remain selected even when the font style changes.
Snack, code example, screenshot, or link to a repository:
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.
Description
When a user taps on a TextInput field, we'd like to change the border color and font style so that the user can easily see where they are typing. When changing the border style, the selected text in TextInput remains the same. When changing the font style, the selection is lost and the cursor moves to the end of the TextInput.
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Deactivating or activating border style changes have no effect on selection behavior.
Expected Results
I expect the text to remain selected even when the font style changes.
Snack, code example, screenshot, or link to a repository:
This only affects iOS. Make sure you run this example using an iOS emulators.
https://snack.expo.io/@apfritts/textinput-focus-bug
The text was updated successfully, but these errors were encountered: