App
App copied to clipboard
[$250] Firefox - Chat- Intended comment not copied to clipboard after highlighting a part of the text and selecting another message reported by @daraksha-dk
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:
- Go to any chat
- Select a part of any message
- Open the context menu for any message
- Select "Copy to Clipboard" option
- the selected part in 2nd step will be copied instead of the message on 3rd step
Expected Result:
the whole message should get copied for which the context menu was open
Actual Result : Only the initial selected text is getting copied
Workaround:
unknown
Platform:
Where is this issue occurring?
- Web - Firefox only
Version Number: 1.2.24-1 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:
https://user-images.githubusercontent.com/43996225/200364117-b7abebd7-abe6-446f-b405-651e04702d84.mp4
https://user-images.githubusercontent.com/43996225/200364171-f4e60499-3ea1-4fa8-9332-d29ff11f69ca.mp4
Expensify/Expensify Issue URL: Issue reported by: @daraksha-dk Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1667833739312529
Triggered auto assignment to @NicMendonca (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
I am having trouble reproducing this, so asking here
Current assignee @NicMendonca is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External
)
Triggered auto assignment to @tgolen (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Job posting: https://www.upwork.com/jobs/~01062c3d4a49229c53
Proposal
--- a/src/pages/home/report/ReportActionItem.js
+++ b/src/pages/home/report/ReportActionItem.js
@@ -107,6 +107,13 @@ class ReportActionItem extends Component {
if (this.props.draftMessage) {
return;
}
+
+ const windowSelection = window.getSelection();
+ if (!event.target.contains(windowSelection.focusNode)) {
+ windowSelection.selectAllChildren(event.target);
+ windowSelection.removeAllRanges();
+ }
+
const selection = SelectionScraper.getCurrentSelection();
ReportActionContextMenu.showContextMenu(
ContextMenuActions.CONTEXT_MENU_TYPES.REPORT_ACTION,
Pros & Cons
Pros:
- Fix the issue
- Identical behaviour on all browsers
Cons: (maybe Pros2?)
- The selected text will be deselected (currently in FF it's already being deselected due to a bug #12521) IMHO, I think this is a desired behaviour as keeping the text1 highlighted and copying text2 is confusing
https://user-images.githubusercontent.com/16493223/200625035-cfa76400-92cd-4035-9604-9710d1bb8290.mp4
I am about to go OOO for a week, so re-assigning.
Triggered auto assignment to @slafortune (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
I think this should be set on hold in favour of #12521
@tgolen @s77rt @Santhosh-Sellavel The other issue is moving along nicely - any reason why this one can't be closed?
@slafortune Not the same issue. I though fixing the first issue will fix this as well but does not seem like it
AFAIK we said we would not be focusing on supporting firefox, so I think we should close this issue.
Ah - agreed! https://expensify.slack.com/archives/C01GTK53T8Q/p1668730285445209