react-native
react-native copied to clipboard
When using TextInput with secureTextEntry={true} on iOS, pressing the back button erases the entire text instead of just the last character.
Description
When using TextInput with secureTextEntry={true} on iOS, pressing the back button erases the entire text instead of just the last character.
Expected Behavior: The back button should erase only the last character of the input in the TextInput.
Current Behavior: The entire text is erased when pressing the back button once.
Steps to reproduce
- Enter text in a TextInput with secureTextEntry={true}.
- Focus out of the input (e.g., move to the next input field).
- Refocus on the TextInput.
- Press the back button to erase text.
React Native Version
0.72.5
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M2
Memory: 49.34 MB / 8.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.16.0
path: ~/.nvm/versions/node/v20.16.0/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.8.1
path: ~/.nvm/versions/node/v20.16.0/bin/npm
Watchman:
version: 2024.08.05.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2411.12071903
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
Ruby:
version: 3.1.4
path: /Users/testUser/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.5
wanted: 0.72.5
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: false
newArchEnabled: false
Stacktrace or Logs
### Stacktrace or Logs
N/A
Reproducer
https://github.com/S170209/TextInputIssueRepro.git
Screenshots and Videos
https://github.com/user-attachments/assets/fcb30253-405d-48d2-9636-2c4b576e5b51
| :warning: | Unsupported Version of React Native |
|---|---|
| :information_source: | It looks like your issue or the example you provided uses an unsupported version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support. |
| :warning: | Unsupported Version of React Native |
|---|---|
| :information_source: | It looks like your issue or the example you provided uses an unsupported version of React Native. Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support. |
@S170209 Can you provide a reproducer using this template. It will be helpful for us.
Hello @S170209 could you provide reproduce code so it would be better
@S170209 Can you validate on newArch as well
This seems to be fixed here: https://github.com/facebook/react-native/pull/45964
@meetdhanani17 @deepanshushuklad11 care to check #45964 ? thanks!
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.