iOS forces the user to double click a button to copy content to Clipboard

Hello everyone. I'm facing an issue that I couldn't solve with some research on another websites and forums.


I have a button right bellow to a text box, that triggers an action. That action runs a Javascript and copies the content in the text box, so the user can paste it wherever he wants with Ctrl+V. This is working fine in browsers and android devices. 

When the user tries to do this on iPhone or iPads, it doesnt copy the content as expected (but still triggers the action! Because I have an Info message that is triggered when he clicks once.) If the user clicks twice on the button, it copies the content.


I've tried this code and other ones that are similar, but nothing seems to solve this.


Appreciate if you can help me, thanks in advance!

Following up...were you able to make any progress on this?

If not, can you share a small OML that reproduces the issue? Might make it easier for others to help troubleshoot.

Hello, thanks for your answer. I did not solve this yet.


With this shared oml, you can see that we are able to copy the content to clipboard when testing on browser or android. It does not work on iOS.


Looking to hear from you,

Thanks,

Miguel Matos

Just tested this on a 5th-gen iPad running iOS 13.1.3, and it's working normally for me. If I add text to the text box (or leave the default), tap the "Copy" button, modify the text, and then paste in the text box, what I get is the text that was in the text box when I tapped "Copy".

That is the expected behavior, no?

Have you tested this simplified version on your devices? Maybe something else in your Action is causing the issue.

G. Andrew Duthie wrote:

Just tested this on a 5th-gen iPad running iOS 13.1.3, and it's working normally for me. If I add text to the text box (or leave the default), tap the "Copy" button, modify the text, and then paste in the text box, what I get is the text that was in the text box when I tapped "Copy".

That is the expected behavior, no?

Have you tested this simplified version on your devices? Maybe something else in your Action is causing the issue.

Hi, thanks for your help. Are you clicking the "Copy" option that shows up when you click the created "Copy" button?


I don't want to click on that "Copy" default option that pops up. I want it to copy the text right after I click the Outsystems "Copy" button.


Sorry if that was confusing.


Thanks in advance, looking to hear from you,

Miguel Matos


When I test the OML, I do not have a pop-up for the default iOS copy/paste. The app simply selects and copies the selected text to the clipboard.

G. Andrew Duthie wrote:

When I test the OML, I do not have a pop-up for the default iOS copy/paste. The app simply selects and copies the selected text to the clipboard.

That's is exactly the behaviour I want. But it is not what is happening.


Have you tested on multiple iOS devices? If not, perhaps you can find some friends/colleagues to help you test on a variety of iOS versions/devices to try to isolate where the behavior is or isn't happening?