-
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
[HOLD #27977][$500] Chat - Cursor is not displayed after 6 lines have been entered in compose box #35369
Comments
Triggered auto assignment to @garrettmknight ( |
Job added to Upwork: https://www.upwork.com/jobs/~01dd5527568c5f7f46 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
📣 @rayanetech! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Cursor goes out of view after adding more than 6 lines What is the root cause of that problem?For small screen devices, the max number of lines for Composer input is set to 6 lines. On mobile safari beyond this height overflow scroll behaviour sets in. So even though the scroll height of TextArea increases the visible area of the TextArea is limited to 6 lines. So cursor moves beyond the visible area when new line is entered beyond 6 lines. That's the reason cursor gets hidden. However when user enters any other character the scroll position is reset to the cursor position making the cursor visible again. What changes do you think we should make in order to solve the problem?The scroll position of the Composer TextArea should be set to the cursor position at all times, even when the character entered is a new line. To acheive this we already have a hook App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js Lines 544 to 555 in 4e88eea
Instead add useEffect(() => {
// Scrolls the composer to the bottom and sets the selection to the end, so that longer drafts are easier to edit
updateMultilineInputRange(textInputRef.current, shouldAutoFocus);
if (value.length === 0) {
return;
}
Report.setReportWithDraft(reportID, true);
// Add value as a dependency so that the hook runs on value change
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [value]); Result
What alternative solutions did you explore? (Optional)None |
@garrettmknight, @mananjadhav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@mananjadhav Ah my bad! It was supposed to be before and after videos. Both videos are for iOS mWeb. Will fix the titles shortly. |
I think this looks good, but I wonder if adding @thienlnam would love your opinion on this case since you were working on the new composer! |
Looks like this was created before live markdown was added - let's see if this is still reproducible first and then if it is, it would likely be independent of the live markdown changes and can be addressed seperately |
@kavimuru Based on the previous comment, can you please retest this? |
MarkdownTextInput was added only for native platforms. This is still reproducible on main. |
Yes, but we're also merging the new markdown on web soon. Let's wait on that before trying to solve this issue. moving this to weekly until then. |
@danieldoglas @thienlnam Do we have any PR or issue that we can link against? |
The web implementation was merged yesterday in the react-live-markdown repo Expensify/react-native-live-markdown#32, and it looks like it's making it's way to web here #35837 |
Live markdown web has been merged! |
@kavimuru Is this still reproducible? |
We actually ended up reverted the PR, but I'm going to update the issue it's held on so we can wait until then |
still on hold |
Still holding on #279877 |
Looks like it's fixed, closing! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v1.4.33-0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
Action Performed:
Pre-requisite: user must be logged in.
Expected Result:
The cursor should be displayed no matter how many lines are being entered.
Actual Result:
The cursor disappears after more than 6 lines have been entered.
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?
Screenshots/Videos
Add any screenshot/video evidence
Bug6360353_1706581410106.Ryzu6837_1_.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: