Share feedback, ideas and get community help

Updated last week

Copy-to-Clipboard Not Working on Mobile Devices but Works on Desktop

Hello everyone,

I'm experiencing an issue with a copy-to-clipboard functionality in JavaScript. The feature works perfectly on desktop browsers (tested on Chrome, Firefox, and Edge), but it does not work on mobile browsers, including Chrome and Safari on both iOS and Android.

When I click the button on a desktop browser, the text is successfully copied to the clipboard, and I receive a confirmation (e.g., an alert or visual feedback). However, when I perform the same action on a mobile browser, the feedback still appears (indicating success), but the text is not actually copied to the clipboard.

Iโ€™ve tried ensuring compatibility by making the element selectable and testing across different devices and browsers. Despite my efforts, it seems that the issue is specific to mobile environments.

Has anyone else faced a similar problem? Are there known limitations or alternative solutions for reliably copying text to the clipboard on mobile devices? Any insights or recommendations would be greatly appreciated!

Thank you in advance! ๐Ÿ˜Š
B
1 comment
Do you have an example to share? How can we reproduce?
Add a reply
Sign up and join the conversation on Discord