Undo/redo doesn't work in TextInput on iOS
Description
In an iOS simulator, if you make multiple changes to a TextInput's value, you can only undo once. After that, subsequent attempts at undoing or redoing (via Cmd-Z or Shift-Cmd-Z) fail.
By contrast, if you perform the repro steps in a TextInput within a react-native-macos app, undo/redo seems to work just fine.
Steps to reproduce
In a new React Native app, add the following anywhere:
<TextInput placeholder="Placeholder" />
Alternatively, you can use the search bar in RNTester.
Open the app in an iOS simulator and do the following:
- Insert text into the text input.
- Move the cursor to another point, and insert some more text. Repeat several times.
- Press Cmd-Z once.
- Press Cmd-Z again.
- Press Shift-Cmd-Z.
Expected: Steps 4 and 5 will continue to undo/redo.
Actual: Steps 4 and 5 do nothing.
React Native Version
0.73.6
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.4
CPU: (10) arm64 Apple M1 Pro
Memory: 432.50 MB / 32.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 21.3.0
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.21
path: ~/.nvm/versions/node/v18.19.0/bin/yarn
npm:
version: 10.2.4
path: /opt/homebrew/bin/npm
Watchman:
version: 2023.11.27.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /opt/homebrew/bin/pod
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: Not Found
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.6
wanted: 0.73.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
Not applicable
Reproducer
https://github.com/facebook/react-native/packages/rn-tester
Screenshots and Videos
No response
| :warning: | Missing Reproducible Example |
|---|---|
| :information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.
This issue was closed because the author hasn't provided the requested feedback after 7 days.