-
Notifications
You must be signed in to change notification settings - Fork 31
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
Mobile view address copy issue #277
Comments
We can solve the issue by:
The suggested fix is that we can use the new Clipboard API along with a fallback to the older document.execCommand to support all cases. |
Please ensure you are able to replicate the issue in order to verify using Clipboard API correctly solves the issue. It looks like the issue is with selection rather than copying. Using selectionEnd or trim() appears to be recommended fix for this: https://stackoverflow.com/questions/34477425/javascript-execcommandcopy-copies-text-but-adds-extra-white-space-to-value
Lets use Clipboard API, without fallback as this appears supported by most modern browsers. |
Alright, let's move to Clipboard API. P.S. I was not able to replicate the issue on my mobile device, I tried it with Edge Mobile Browser and Chrome Mobile Browser. Both of them seemed to copy the text without any spaces. |
Merchant reported that when in mobile view, clicking copy the address gets two blank spaces appended to the end of the clipboard causing issues pasting to wallets.
The text was updated successfully, but these errors were encountered: