-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix text copied in reverse order on inverted flatlist #5561
Conversation
…xt into buffer in reversed order; I have removed flatlist inversion (by inverted=true prop) which used [transform: translate] css hack and instead adding flatlist array items in reverse order [unshift instead of push]; It also reverses ScrollView event response received from browser [e.nativeEvent.configOffset *= -1];
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Hey @azimgd, I've checked out this branch and tested the changes and it doesn't appear that that issues are fixed in the github issue #3381. The order of chats is the same but the symptoms of a css inverted flat list are still occurring.
and copy it, pasting it should not result in 54321 but 12345 |
Hmm, I see that in the video that is the behavior that we would expect but I don't seem to be getting the same results on your branch - is there something I'm missing? I've double checked that I'm on your branch and have run However, here are my results on localhost |
Add postinstall script with patch-package execution, to update react-native-web repo inside node_modules which fixes inverted FlatList
@thienlnam |
This is working pretty well - only thing I'm noticing right now is that the scroll event is opposite - can we have the page scroll in the same direction (as whatever the user set as default?). The scrolling is opposite of what is happening in the current app |
Remove obsolete scroll wheel inversion (w/ invertedWheelEvent) as FlatList supports native list inversion now;
@thienlnam Removed obsolete scroll wheel inversion (w/ invertedWheelEvent) as FlatList supports native list inversion now. |
Awesome, this tests well! |
closing in favor of #6268 |
@thienlnam
This is a draft in attempt to move progress on #3381 a bit further. Please note that this is by no means a final PR, this is simply a demo to let QA team validate there are no regressions by using this approach.
I used patched version of [email protected] with fixes for copying text into buffer in reversed order;
React native web diff: https://github.com/azimgd/react-native-web/pull/1/files
Details
I have removed flatlist inversion (by inverted=true prop) which used [transform: translate] css hack and instead adding flatlist array items in reverse order [unshift instead of push]; It also reverses ScrollView event response received from browser [e.nativeEvent.configOffset *= -1];
Fixed Issues
#3381
Tests
npm install
which will patch react-native-web packagenpm run web
QA Steps
Tested On
Screenshots
Web
Screen.Recording.2021-08-09.at.01.16.16.mov
Mobile Web
Desktop
iOS
Android