Skip to content
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

[$250] mWeb/Chrome - Text Insertion point goes out of the sight on typing in the middle of the paragraph - reported by @Tushu17 #8663

Closed
mvtglobally opened this issue Apr 17, 2022 · 39 comments · Fixed by #9062
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mvtglobally
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go Chat
  2. Write 10-12 line text
  3. Type some words on the 4th-5th line.

Expected Result:

Text insertion point should remain at a constant position.

Actual Result:

It kept moving in and out of sight.

Workaround:

unknown.

Platform:

Where is this issue occurring?

  • Mobile Web (Chrome)

Version Number: 1.1.49-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen_Recording_20220310-222501_Chrome.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Tushu17
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1646931771824919

View all open jobs on GitHub

@mvtglobally mvtglobally added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Apr 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 17, 2022

Triggered auto assignment to @cdraeger11 (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot added Overdue and removed AutoAssignerTriage Auto assign issues for triage to an available triage team member labels Apr 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 20, 2022

@cdraeger11 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Apr 20, 2022
@cdraeger11 cdraeger11 removed their assignment Apr 20, 2022
@melvin-bot melvin-bot bot removed the Overdue label Apr 20, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 20, 2022

Triggered auto assignment to @MariaHCD (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@MariaHCD MariaHCD added the External Added to denote the issue can be worked on by a contributor label Apr 21, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 21, 2022

Triggered auto assignment to @kadiealexander (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MariaHCD MariaHCD removed their assignment Apr 21, 2022
@kadiealexander
Copy link
Contributor

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Apr 22, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 22, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 22, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 22, 2022

Triggered auto assignment to @pecanoro (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot changed the title mWeb/Chrome - Text Insertion point goes out of the sight on typing in the middle of the paragraph - reported by @Tushu17 [$250] mWeb/Chrome - Text Insertion point goes out of the sight on typing in the middle of the paragraph - reported by @Tushu17 Apr 22, 2022
@b1tjoy
Copy link
Contributor

b1tjoy commented Apr 26, 2022

Proposal

Reason

When the text changed in TextInput, the updateComment callback function is called, and in the last line of the function we always set scollTop to scrollHeight, which means always scoll to the last of TextInput, this is why the insertion point goes out of the sight.

updateComment(newComment) {
this.textInput.setNativeProps({text: newComment});
this.setState({
isCommentEmpty: newComment.trim().length === 0,
});
// Indicate that draft has been created.
if (this.comment.length === 0 && newComment.length !== 0) {
Report.setReportWithDraft(this.props.reportID.toString(), true);
}
// The draft has been deleted.
if (newComment.length === 0) {
Report.setReportWithDraft(this.props.reportID.toString(), false);
}
this.comment = newComment;
this.debouncedSaveReportComment(newComment);
if (newComment) {
this.debouncedBroadcastUserIsTyping();
}
this.textInput.scrollTop = this.textInput.scrollHeight;
}

And I checked the submit history of ReportActionCompose.js
Pull #7369 add the code
this.textInput.scrollTop = this.textInput.scrollHeight;

to solve issue #7351, but cause our current issue, the right way to fix issue #7351 is to call TextInput focus() at last of updateComment callback, not just set scroll to the last of TextInput.

Solution

Modify this line

this.textInput.scrollTop = this.textInput.scrollHeight;

to

this.textInput.focus();

will fix both issue #7351 and the current issue.

I will upload screenshot lately.

@pecanoro
Copy link
Contributor

Sounds good! Assigning @b1tjoy to the issue! Don't forget to apply in Upwork

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 17, 2022

📣 @b1tjoy You have been assigned to this job by @pecanoro!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@kadiealexander
Copy link
Contributor

@b1tjoy please let me know your upwork username so I can hire you for the job. :)

Offers sent to @parasharrajat for C+ and @Tushu17 for reporting.

@Tushu17
Copy link
Contributor

Tushu17 commented May 17, 2022

Offer accepted👍

@b1tjoy
Copy link
Contributor

b1tjoy commented May 18, 2022

@b1tjoy please let me know your upwork username so I can hire you for the job. :)

Took me some time to figure what my upwork username is, but i still don't know, can I submit a proposal on upwork?

I have issue with screenshot on Android simulator, I will take screenshot on real device and make pull request less than 24 hours.

@kadiealexander
Copy link
Contributor

@b1tjoy I recieved and accepted your upwork proposal, thank you!

@kadiealexander
Copy link
Contributor

Discussions happening in the PR, not overdue.

@melvin-bot melvin-bot bot removed the Overdue label May 29, 2022
@kadiealexander
Copy link
Contributor

@parasharrajat and @b1tjoy could you please share an update here?

@parasharrajat
Copy link
Member

parasharrajat commented Jun 7, 2022

I have to do some research for moving ahead with the PR. We are looking for better solution.

@kadiealexander
Copy link
Contributor

@parasharrajat how's your research going?

@parasharrajat
Copy link
Member

Updates on the PR. We are moving ahead.

@melvin-bot melvin-bot bot added the Overdue label Jun 22, 2022
@parasharrajat
Copy link
Member

Shared an update on PR.

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2022
@melvin-bot melvin-bot bot added the Overdue label Jul 4, 2022
@kadiealexander
Copy link
Contributor

Not overdue, updates in PR.

@melvin-bot melvin-bot bot removed the Overdue label Jul 4, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2022

@pecanoro @kadiealexander Be sure to fill out the Contact List!

@Tushu17
Copy link
Contributor

Tushu17 commented Jul 12, 2022

The payment is pending here.
cc: @kadiealexander

@kadiealexander
Copy link
Contributor

Sorry for the confusion there! Have opened and will pay after the regression period.

@pecanoro please don't close these issues until the payment is issued.

@kadiealexander
Copy link
Contributor

Everyone is paid! Thanks team :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants