-
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
[WAITING ON MIROSLAV FOR PAYMENT] [HOLD for payment 2023-10-02] [$1000] content of input jumps from top to bottom in multi-line inputs #21654
Comments
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Content of Input jumps from top to bottom in multi-line input What is the root cause of that problem?We set focus on the input after transition ends as you can see below
So focus is set after the transition ends and the modal is shown fully. This is the root cause What changes do you think we should make in order to solve the problem?When we add
We can use
, where This works as expected on all platforms. Result21654_mac_chrome.mp4What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Content jumps from top to bottom in multi line input in task description page What is the root cause of that problem?Root cause is the late setting of focus using ref because initially cursor is placed at top and later it is brought down using selection prop. And when we focus after this, it shows the jump behaviour.
What changes do you think we should make in order to solve the problem?What other proposal above suggested defeats the purpose of our logic of solving transition issue since on Android it will cause problems. To tackle this in a different way, we have another prop called <TextInput
........
autoFocus
shouldDelayFocus = {shouldDelayFocu}
.........
>
<TextInput/> Ofcourse we need to import the shouldDelayFocus prop first. Update: There have been some changes in the file and now we are no longer using setting the selection in useEffect and we have introduced a new util Updated code: const inputRefCallback = useCallback((el) => {
if(!el) {
return;
}
focusMultilineUsingCallbackRef(el, inputRef);
inputRef.current = el;
}, []);
..........................
<TextInput
ref={inputRefCallback}
>
................... export default function focusMultilineUsingCallbackRef(el, inputRef) {
if(inputRef.current) {
return;
}
if(shouldDelayFocus) {
setTimeout(() => {
focusAndUpdateMultilineInputRange(el);
}, CONST.ANIMATED_TRANSITION);
}
else focusAndUpdateMultilineInputRange(el);
} Resultsbandicam.2023-07-03.16-22-12-723.mp4What alternative solutions did you explore? (Optional)None |
Job added to Upwork: https://www.upwork.com/jobs/~014ef411cb69302ae1 |
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
@0xmiroslav have you had a chance to review the proposals that have come in so far? |
@0xmiroslav can you review the proposals above? |
Triggered auto assignment to @jliexpensify ( |
@jliexpensify Reassigning for sabbatical CURRENT STATUS:Waiting on a proposal to be chosen
|
BUMP @0xmiroslav |
@chiragxarora can you please test if your solution doesn't break auto-focus on all platforms (especially android, mChrome, mSafari)? |
@0xmiroslav |
@s-alves10 your solution will break android auto-focus |
sure, will do that in morning |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payment Summary:
Miroslav, please complete the checklist. |
I think urgency bonus applies here too since the PR was held on @thienlnam 's response for more than a day |
Ok, that's fair - I can trace it to this comment. I'll adjust! |
No, Here's the first comment which linked this issue. |
This is minor UI improvement than bug and doesn't affect user input at all so I don't think we should create regression test. |
Thanks, are you ready to take payments @0xmiroslav ? |
Also @jliexpensify the reporting bonus offer which I just accepted in the upwork is for 50$ 😅 |
Not yet. Please close this for now after @chiragxarora's payment is done. I am tracking myself. |
@chiragxarora no worries, I will fix this up when I pay - there's the ability to add bonuses. |
Okay thanks |
Oh weird, the job is now closed - @chiragxarora you haven't been paid right? I guess it was an old listing. |
Yes I'm not yet paid @jliexpensify |
Actually @jliexpensify both of my contracts are running in upwork, for contributor and reporter, I've accepted them, you should be able to get into those contracts and pay there I think? |
https://www.upwork.com/nx/wm/workroom/34868871/overview Does this work? |
Are you able to find this in your active contracts? |
@chiragxarora I can pay these ones - can you send me a link to the reporter one as well? |
Thanks, have paid you @chiragxarora . @0xmiroslav closing this out, but here is the payment summary. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
content should be at bottom at the time of rendering
Actual Result:
content of input jumps from top to bottom
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.32-5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
bandicam.2023-06-24.18-12-20-493.mp4
Recording.1111.mp4
Expensify/Expensify Issue URL:
Issue reported by: @chiragxarora
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687610858267479
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: