App icon indicating copy to clipboard operation
App copied to clipboard

[$500] mWeb - Chat - Sometimes the cursor is placed before the emoji

Open lanitochka17 opened this issue 1 year ago • 16 comments

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


Version Number: 1.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:

  1. Open a chat
  2. Type a single emoji to the composer with emoji picker (don't send it)
  3. Tap away so the composer loses focus
  4. Tap inside the composer again
  5. Repeat steps 2-4 until the bug appears

Expected Result:

The cursor should always be after the emoji.

Actual Result:

Sometimes the cursor is placed before the emoji

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/64d148df-03dd-4e6e-bbc6-9600fd500f43

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0166536b4c825bb51e
  • Upwork Job ID: 1752325119743647744
  • Last Price Increase: 2024-02-06

lanitochka17 avatar Jan 30 '24 13:01 lanitochka17

Job added to Upwork: https://www.upwork.com/jobs/~0166536b4c825bb51e

melvin-bot[bot] avatar Jan 30 '24 13:01 melvin-bot[bot]

Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Jan 30 '24 13:01 melvin-bot[bot]

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

melvin-bot[bot] avatar Jan 30 '24 13:01 melvin-bot[bot]

We think that this bug might be related to #vip-vsp CC @quinthar

lanitochka17 avatar Jan 30 '24 13:01 lanitochka17

I found a more consistent way to reproduce this bug which may not have to do with the emoji picker:

  1. Type anything, text or emojis.
  2. Click inside the textarea (not padding).
  3. Click on the padding of the textarea.

https://github.com/Expensify/App/assets/18640252/87c69137-4227-4253-b304-3372ea1d5f58

This will cause the cursor to jump to the beginning of the textarea, at least on Chrome/MacOS. It seems like this behavior is dictated by the browser. Here are some stackoverflow posts describing the same issue:

https://stackoverflow.com/questions/64874384/how-do-i-avoid-cursor-jump-to-beginning-of-the-input-when-clicking-near-its-edge

https://stackoverflow.com/questions/58732887/clicking-on-the-padding-of-an-input-field-sets-the-cursor-at-the-beginning-of-th

ayoung19 avatar Jan 31 '24 10:01 ayoung19

📣 @ayoung19! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Jan 31 '24 10:01 melvin-bot[bot]

Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01b17d36b6311f055a

ayoung19 avatar Jan 31 '24 10:01 ayoung19

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

melvin-bot[bot] avatar Jan 31 '24 10:01 melvin-bot[bot]

@thesahindia - when you get a chance, can you review the proposal? Thanks!

alexpensify avatar Jan 31 '24 20:01 alexpensify

@thesahindia any update here?

alexpensify avatar Feb 02 '24 22:02 alexpensify

We don't have a proposal yet.

thesahindia avatar Feb 04 '24 22:02 thesahindia

I didn't create a proposal because I don't think this is actually a bug.

ayoung19 avatar Feb 04 '24 23:02 ayoung19

Whoops, I mixed up the feedback as a proposal.

alexpensify avatar Feb 06 '24 00:02 alexpensify

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Feb 06 '24 16:02 melvin-bot[bot]

No update, still open for proposals here.

alexpensify avatar Feb 07 '24 23:02 alexpensify

Proposal

Please re-state the problem that we are trying to solve in this issue.

Sometimes when we click into the composer from the end, the caret starts at the beginning

What is the root cause of that problem?

As @ayoung19 identified, it's when the customer presses on the padding instead of the text input. The browser gives a cursor event with start and end of 0, so that's why the cursor goes to the start in this scenario. It's like tabbing into the Composer. This seems common in browsers.

What changes do you think we should make in order to solve the problem?

We have to remove the vertical padding, and add it to the line-height if we want to increase the clickable text input area, with the correct cursor position.

What alternative solutions did you explore? (Optional)

We can use margin instead of padding, and make the area not clickable. forcing them to press the center.

jeremy-croff avatar Feb 08 '24 00:02 jeremy-croff

I could implement exact CSS but the goal outcome is to maintain the same layout and either increase the clickable area with the correct cursor position, or to disable the click ability of the padding.

Alternative solutions are to move up the padding to the wrapper of the component, and to increase the height of the input to negate the padding.

jeremy-croff avatar Feb 08 '24 01:02 jeremy-croff

@thesahindia - when you get a chance, can you review this new proposal? Thanks!

alexpensify avatar Feb 09 '24 18:02 alexpensify

@thesahindia any update here?

alexpensify avatar Feb 12 '24 16:02 alexpensify

@alexpensify @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Feb 13 '24 15:02 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Feb 13 '24 16:02 melvin-bot[bot]

@thesahindia - please keep us posted if you are unable to review and we will find a replacement. Thanks!

alexpensify avatar Feb 14 '24 19:02 alexpensify

@alexpensify, just looked at it again and this isn't a bug but the default browser behaviour so I think we should close this.

thesahindia avatar Feb 14 '24 19:02 thesahindia

Thanks for the feedback! Closing!

alexpensify avatar Feb 14 '24 20:02 alexpensify