ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.02k stars 13.51k forks source link

Ionic 4 text highlight selection not working as expected #17753

Closed kkbrains closed 3 years ago

kkbrains commented 5 years ago

Bug Report

Ionic version:

[x] 4.x

Current behavior:

Highlighting text selection component is not staying on the selected region Expected behavior:

Text Highlight selection have to stay on the selected region. Expected to work like on Safari or other browser text selection Steps to reproduce:

Create a new ionic 4 app, load div text items inside ion-content and enable user-select for ion-content in CSS

Related code:

ezgif-1-b611fd736f57

brandyscarney commented 5 years ago

Thanks for the issue!

Note to team: I was able to reproduce this using the following test: http://localhost:3333/src/components/select/test/standalone

And adding an ion-app/ion-content wrapper with this CSS:

ion-content {
  user-select: text;
  -webkit-user-select: text;
}

Loading it in Safari on my phone allowed me to reproduce.

larpo1 commented 5 years ago

Can confirm this is still a problem. Any update?

liamdebeasi commented 3 years ago

Hi everyone,

It looks like this was an issue in WebKit that has since been fixed. On iOS 14 I can observe that the blue highlight hides while scrolling and re-appears in the correct location after stopping. Closing as the issue has been fixed on newer versions of iOS.

ionitron-bot[bot] commented 3 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.