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

[$1000] Chat - Context Menu - User can move emotion reactions row #18608

Closed
2 of 6 tasks
kbecciv opened this issue May 8, 2023 · 16 comments
Closed
2 of 6 tasks

[$1000] Chat - Context Menu - User can move emotion reactions row #18608

kbecciv opened this issue May 8, 2023 · 16 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented May 8, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when executing PR #18365

Action Performed:

  1. Go to URL https://staging.new.expensify.com/
  2. Login to ND.
  3. Open any chat with a history of messages.
  4. Right click on any message that is close to the header.
  5. Click and drag on the context menu, specifically the quick emoji reactions row and ensure that the window does not move.

Expected Result:

Emoji reactions row and window does not move.

Actual Result:

User can move emotion reactions row.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.11.2

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6045148_Recording__574.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ea82eb69ee3a04ea
  • Upwork Job ID: 1657006167426883584
  • Last Price Increase: 2023-05-12
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 8, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@bfitzexpensify
Copy link
Contributor

I am unable to reproduce:

2023-05-09_14-19-50.mp4

@kbecciv are you still able to reproduce this?

@therealsujitk
Copy link
Contributor

Proposal

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

The reactions row (and other contents) in the context menu modal is drag-able even though it has the #no-drag-area id and shouldn't be drag-able.

What is the root cause of that problem?

The property -webkit-app-region in the code below doesn't prevent the user from dragging components, it only specifies that the region cannot be used to drag the window.

App/web/index.html

Lines 37 to 42 in d516b63

#drag-area {
-webkit-app-region: drag;
}
#no-drag-area {
-webkit-app-region: no-drag;
}

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

To solve this problem we can use the property -webkit-user-drag. After this the content will still be drag-able if the text is selected first, to prevent this we can use the property user-select.

#no-drag-area {
    -webkit-app-region: no-drag;
    -webkit-user-drag: none;
    user-select: none;
}

What alternative solutions did you explore? (Optional)

  • An alternative solution would be to call the preventDefault() function on the mouseDown event on the modal.

@therealsujitk
Copy link
Contributor

@bfitzexpensify you can also try selecting text in the context menu to reproduce this. I believe the reaction bar is being selected somehow after which it becomes drag-able (explained in my proposal).

Screencast.from.09-05-23.10.18.32.PM.IST.webm

@huzaifa-99
Copy link
Contributor

@therealsujitk i think we could also apply

 -webkit-user-drag: none;
 user-select: none;

to the emoji row directly as it makes everything inside the modal "non-dragable"

@therealsujitk
Copy link
Contributor

@huzaifa-99 sorry I didn't get you. I applied it to anything with the id #no-drag-area so this fixes other components that have similar issues, consequently these properties also apply to the components descendants that includes the reaction row as well as the text below it.

@huzaifa-99
Copy link
Contributor

I was actually suggesting to apply the styles to the emoji row only, but maybe thats not desired as you mentioned other areas might have those issues.

@melvin-bot melvin-bot bot added the Overdue label May 11, 2023
@bfitzexpensify
Copy link
Contributor

Yep, after trying this a bunch, I was eventually able to reproduce.

@melvin-bot melvin-bot bot removed the Overdue label May 12, 2023
@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label May 12, 2023
@melvin-bot melvin-bot bot changed the title Chat - Context Menu - User can move emotion reactions row [$1000] Chat - Context Menu - User can move emotion reactions row May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01ea82eb69ee3a04ea

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Current assignee @bfitzexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

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

@s77rt
Copy link
Contributor

s77rt commented May 12, 2023

I don't think this is a bug or something that we should be concerned about. Anything that is selectable is dragable.

@thienlnam @bfitzexpensify Can we close this?

@bfitzexpensify
Copy link
Contributor

I think I agree, it doesn't seem like a significant issue. Happy to close if you are @thienlnam

@bfitzexpensify
Copy link
Contributor

Let's close this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants