iOS/Android - Message - Copy message menu is not displayed when pressing on the message
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Expected Result:
Copy icon should appear and able to copy the message
Actual Result:
Copy icon does not appear, only device copy functionality opens up
Action Performed:
- Launch the app and login
- Select any message from LHN
- Long press on any message
Workaround:
If you press directly on the text the correct menu opens.
Platform:
Where is this issue occurring?
Web iOS ✔️ Android ✔️ Desktop App Mobile Web
Version Number: 1.0.15-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: This was not reproducible on previous regression. The correct menu to copy the message would appear.
Upwork post: https://www.upwork.com/jobs/~0117a4dc6fabf8301b
@roryabraham not sure if we should mark this as a deploy blocker (since the copy functionality is not available in prod and it's working if you press directly on the message) please let me know what you think 😬
No need to block deploys on this. I shall fix
Issue reproducible during today's KI retests
I pushed some code updates to the WIP pull request, but it's been very challenging to make this work in all cases, especially on mobile web.
What I have on my PR branch seems to work better than on main, without introducing any new bugs. So maybe we should just merge it and get some of the improvements, even if it doesn't work perfectly. 🤷🏼♂️
Issue reproducible during today's KI retests
Issue reproducible during today's KI retests
Issue reproducible today during KI retests
My PR was pretty decayed and didn't work on all platforms, but since this can be worked on externally I think we should get this on Upwork. Hopefully my draft PR can still be a resource to the contributor that we hire to fix this issue. It's trickier than it looks! Curious to see what proposals people come up with.
Triggered auto assignment to @laurenreidexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Issue reproducible today during KI retests
https://www.upwork.com/jobs/~0117a4dc6fabf8301b
I will check the call back implemented on press of text and the view that is carrying it. The problem should be somewhere in the callbacks.
proposal: /Users/syva80/Expensify.cash/src/pages/home/report/ReportActionItemFragment.js I'm removing the prop "selectable"
62: - <Text selectable
+ <Text
https://user-images.githubusercontent.com/51112870/121068736-4e446a00-c7d5-11eb-8e91-15c2ac1d3e69.mov
@Viacheslav80 what about the case when there is markdown / html in a message? Have you thought about the other consequences of removing that prop? We still want to be able to select text to copy/paste on (desktop) web and the macOS app.
@roryabraham Hi! I tested it on the web and desktop - it is copied as before. Right now, markdown is not copied in the app, moreover, it is not displayed correctly right now. It doesn't depend on whether we have this prop or not
@Viacheslav80, just removing the selectable prop from the component in that location is not an acceptable solution because it breaks the native highlight/copy functionality on the web & desktop apps.
@roryabraham Ok! We can do a check: selectable={(Platform.OS == "web") ? true : false} ? Do you really not work selection in the web if you remove the "selectable" prop? it works for me on Mac (safari)
Ah, I stand corrected, it seems removing the selectable prop doesn't break native highlight selection on web + desktop. But as a result, the solution doesn't seem to work on mobile web. I tested your original solution on iOS safari and it does not seem to reliably create the correct behavior:



@roryabraham Hi! Ok. We can do a check:
63 <Text selectable={isWeb && screenWidth >= 1024}>
or do something else to check for: isMobile.
Do we need the ability to highlight a part of the text on Mobile web?
https://user-images.githubusercontent.com/51112870/121528161-e58f0480-ca03-11eb-859f-c9feed161ea9.mov