-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 cursor appears in front of digit when highlighting amount and entering digit #42158
Fix cursor appears in front of digit when highlighting amount and entering digit #42158
Conversation
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@bernhardoj I am getting some inconsistencies between staging and this PR on the web. If we try to double-click on the input value, it selects all the values on staging, but in our PR, double-clicking does nothing. Please confirm whether you are getting the same results. Also, when I try to press between the input values on the web, selection doesn't go to that value. e.g. if input values is 789, we press on 1st index then cursor should be at the 8. selection-bug.mov |
@jayeshmangwani I can reproduce it in |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid.movAndroid: mWeb ChromemWeb-chrome.moviOS: NativeiOS.moviOS: mWeb SafarimWeb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@bernhardoj On iOS if I tap to the left of the first digit of an amount, the selection properly is moved to the left, however if I press delete it goes to the beginning. I don't know if this is reproducible in Android. RPReplay_Final1715795745.MP4 |
This comment has been minimized.
This comment has been minimized.
Hmm, I can't reproduce it. I have merged with main, idk if that helps. Screen.Recording.2024-05-16.at.13.35.54.movBtw, looks like the split calculation is broken. I enter the amount as 25 but both participant split is also 25 instead of 12.5 |
I'm not able to reproduce this one |
@bernhardoj You have to put the cursor in the beginning of the amount, not the end, so in your recording try to tap next to the left of the digit |
@youssef-lr Oh, I see you put it on the end in your video, so I follow it 😂, but I am still unable to reproduce it. Untitled.mov |
I am also not able to reproduce this issue. iOS-cursor.mov |
Testing again shortly |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
I'm still able to reproduce :/ I tap exactly to the left of the first digit RPReplay_Final1716205090.MP4 |
Or you can also tap on the currency |
Hmm, still can't reproduce it. In your video, when you tap the currency, the selection moves to the right, that's why when you press delete, the rightmost digit is removed. Maybe it's reproducible in physical devices only? I don't have a physical iOS device. Btw, have you checked whether it's reproducible in |
I have tested the Android ad-hoc, and the issue is not happening for me; my device is not added to iOS testing, so I can not confirm in iOS adhoc |
Yes that works as expected, but the selection should remain at the end, no? |
Yeah, I would expect it to remain at the end too, but I think the real problem here is this one,
My guess is that the App/src/components/MoneyRequestAmountInput.tsx Lines 120 to 123 in e8ae3c5
doesn't match the TextInput internal native
Maybe it's related to this comment App/src/components/Composer/index.native.tsx Lines 27 to 28 in e8ae3c5
I think we should just apply this fix for Android? Or all except iOS? |
Making another build to test |
@bernhardoj can you please merge with main? |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Merged with main |
@youssef-lr Is it possible to add my iOS device for ad-hoc testing builds? I can reproduce the original issue on my iOS device in app store build. To verify this PR ad-hoc, my UDID needs to be added for testing |
@youssef-lr Tested in latest app store build and issue is not happening for me now(it was happening for me on the previous version), can you please check on your side if issue is still happening for you ? |
@jayeshmangwani I'm not familiar with how this is done, but I'll ask for you.
I just reproduced it in the latest build. I'm making a build right now of this PR to test again. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Can we try it in this PR? I'm still reproducing the issue on latest build |
Updated to only apply it on android |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Yeah that fixed it! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/youssef-lr in version: 1.4.82-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.82-4 🚀
|
@@ -1027,7 +1027,6 @@ function navigateToAndOpenReportWithAccountIDs(participantAccountIDs: number[]) | |||
*/ | |||
function navigateToAndOpenChildReport(childReportID = '0', parentReportAction: Partial<ReportAction> = {}, parentReportID = '0') { | |||
if (childReportID !== '0') { | |||
openReport(childReportID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bernhardoj I am confused why we removed the openReport
call from here when I have approved the PR then this change was not here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it is from another PR, but it was intentional to remove it, so there is no need to revert this change, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was intentional to remove it, so no need to revert.
Details
The selection is updated manually and from the onSelectionChange event which could gives a wrong value.
Fixed Issues
$ #41762
PROPOSAL: #41762 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-05-14.at.22.10.25.mov
Android: mWeb Chrome
Screen.Recording.2024-05-14.at.22.12.36.mov
iOS: Native
Screen.Recording.2024-05-14.at.22.06.10.mov
iOS: mWeb Safari
Screen.Recording.2024-05-14.at.22.08.07.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-14.at.22.06.47.mov
MacOS: Desktop
Screen.Recording.2024-05-14.at.22.07.16.mov