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

[BUG] On android, the Copy Address button does not work. #648

Closed
Chef-Chungus opened this issue Mar 12, 2021 · 4 comments · Fixed by pancakeswap/pancake-toolkit#2 · May be fixed by pancakeswap/pancake-uikit#221
Closed
Labels
Bug Something isn't working

Comments

@Chef-Chungus
Copy link
Contributor

Bug Description
On Android devices, copy to clipboard button does not work.

Steps to Reproduce

  1. Go to PancakeSwap on an Android device
  2. Click on your address
  3. Click Copy Address
  4. Address doesn't get copied to clipoard.
    ...

Expected Behavior
Upon clicking copy to clipboard, the address gets copied to your clipboard.

Additional Context
image

@Chef-Chungus Chef-Chungus added the Bug Something isn't working label Mar 12, 2021
@memoyil
Copy link
Collaborator

memoyil commented Mar 12, 2021

Created a pull request in uikit

pancakeswap/pancake-uikit#221

@ArtemKolichenkov
Copy link
Contributor

I tried to reproduce this issue and here are my findings:

Android 10

Copy Address works properly with:

  • Chrome 89.0.4389.86
  • Brave 1.21.74 (Chromium 89.0.4389.72)
  • Firefox 86.1.1 (Build #2015794883)

The only browser that does not copy the address is Trust Wallet's integrated dAPP browser. It does not work there because clipboard-writepermission is denied by default in WebView and iFrame.

@memoyil were you able to reproduce the issue in Chrome/Firefox/Brave on your device? Did you run your solution in Trust dApp browser?

@memoyil
Copy link
Collaborator

memoyil commented Mar 12, 2021

Yes, I tested it there. It works properly

@ArtemKolichenkov
Copy link
Contributor

Actually just checked - turns out the whole navigator.permission is undefined in WebView, i.e. Trust Wallet. So maybe indeed solution by @memoyil is the only way to do it for now to support copying in TrustWallet. Not gonna lie I don't like creating textareas to just copy address, but seems like there is no other way we can fix it on our end. 🙁

I've filed a bug report to Trust Wallet (also made an example to reproduce if you're interested) - trustwallet/wallet-core#1324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants