Allow Copying for either text or ion-textarea


I have been trying all different ways suggested on stackoverflow to make texts selectable in ionic V3 , especially in text-areas (copy, paste) for browsers. I am not trying to make it work on iOS or android just for internet browsers.

It’s only not working on CHROME, i have no clue why

I tried to use this code in app.scss, but it does not make any change, I can’t select words, I can only select all words with ctrl+ A.

  body {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: auto!important;
    user-select: auto !important;

The example of textarea i want to be able to select words from:

 <ion-item id="page-textarea1" class="selectable">
 <ion-textarea id="selectable_text" placeholder="Text"
 formControlName="event_description" [class.invalid]='!slideTwoForm.controls.event_description.valid && (slideTwoForm.controls.event_description.dirty || submitAttempt)'></ion-textarea>

Thank you for your suggestions

1 Like

I just digged another topic where the author met the same problem:

Please ! I’m still stuck