Comments (4)
@cortinico Can you provide the PR that fixes this issue?
Sorry I picked the wrong label
from react-native.
@cortinico Can you provide the PR that fixes this issue?
from react-native.
- Selecting and deleting a word also deletes a space to the left of it, but in this case onSelectionChange fires first
Regarding this issue.
This is the default iOS behaviour.
I checked this on system messaging app. Shared recording for reference.
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-07-10.at.15.55.35.mp4
Findings:
textView(_:shouldChangeTextIn:replacementText:)
[UITextField delegate method] will be called first when we press backspace on keyboard with replacement string "". This will detect that text on Edit Text to be changed(Not reflected yet) and returnYES
from this function.- Returning
YES
from this function will further calltextViewDidChangeSelection
[UITextField delegate method] with removed one left space character.
Solution:
- Since we didn't have any callbacks now where that one extra space is removed. We can live with this default behaviour.
- Or else we can keep previous text from
textView(_:shouldChangeTextIn:replacementText:)
method and check if text got changed intextViewDidChangeSelection
then add that extra space. [Here, lots of edge cases needs to handled]
For this issue:
For the multiline textinput, for the first keypress onSelectionChange fires first, but for later key presses onChangeText/onChange fire first
I started debugging on this.
from react-native.
@TheProBro. @cortinico
Fix for this issue: #45377
For the multiline textinput, for the first keypress onSelectionChange fires first, but for later key presses onChangeText/onChange fire first
Added my findings in PR itself.
from react-native.
Related Issues (20)
- [Android] Emiting Events from HeadlessTask on Android in New Arch + Bridgeless + interop layer HOT 2
- Flatten margin styles are not properly overriding when applied from specific to general properties HOT 8
- Cannot build project after a clean setup without expo HOT 11
- Unable to use react-native SDK ( .aar created from react-native app) in other react-native applications HOT 2
- Error with GeneratePackageListTask when build for Android HOT 28
- StatusBar Area Turns Black When Hidden Instead of Inheriting Background Color HOT 16
- Cannot inherit from final 'com.facebook.react.views.imagehelper.ImageSource' HOT 7
- App does not run at all in Android for React Native Version 75.1 or React Native 74.3 HOT 10
- Facing Maximum call stack size exceeded (native stack depth), stack while upgrading react-native from 0.64.2 to 0.74.0 HOT 6
- App Crashes - On upgrading to Android 14(SDK 34) HOT 2
- Touchable is unresponsive during internal ScrollView scroll on iOS
- npx @react-native-community/cli@latest init MyProject –-version latest, I got latest is not a valid version. HOT 8
- [iOS] Italic does not work in Text HOT 4
- GIF images not working after upgrade from React-Native 0.74.3 -> 0.75.1 HOT 5
- React Native: value attribute exists in 0.72 but not in 0.73 HOT 4
- [iOS] `accessibilityElementsHidden` does not work if the parent view is `accessible`
- Some of us hate kotlin, give us java back. HOT 5
- iOS: RCTImageLoader is documented to be thread safe but the setUp code has a race HOT 2
- ccache not found HOT 3
- Error resolving plugin [id: 'com.facebook.react.settings'] HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.