ionic – Copy/paste in input field in iOS 10 not working

All we need is an easy explanation of the problem, so here it is.

As the title suggests, I am building a project with ionic and I am not able to copy/paste in the input fields on iOS 10. According to this question, by applying these properties to the css the issue should be solved:

 input {
    user-select: auto !important;  
 } 

but unluckily it is still not working. As also suggested by this reference, it says that it may be caused by $ionicLoading, but I am not using it inside my controller.

Do you know how to solve this issue? Thanks in advance for your replies!

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

I was not able to understand your problem.

But if you want it to be really working, you can try it.

Install cordova-plugin-clipboard

var text = "Hello World!";

cordova.plugins.clipboard.copy(text);

cordova.plugins.clipboard.paste(function (text) { alert(text); });

Method 2

Instead of just typing user-select: auto !important;

As in this answer try adding all css to the element instead of just that empty line that might not work on all browsers.

Here:

    -webkit-user-select: auto !important;
    -khtml-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    -o-user-select: auto !important;
    user-select: auto !important;

Method 3

Are you using an ion-spinner?

Just going off the following github thread:

https://github.com/driftyco/ionic/issues/3793

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply