Home:ALL Converter>Problems with text selection in WkWebView from ios 15

Problems with text selection in WkWebView from ios 15

Ask Time:2022-11-28T22:40:42         Author:Sad Developer

Json Formatter

I am experiencing a bug that started happening from iOS 15 when trying to select text in WkWebView. It works perfectly fine in iOS 14 and previous versions. When i tap the screen to select text in the WKWebView the selection box is misplaced. It goes above in the beginning of the document and you can't really tell what are you selecting and you cant select the text you want. In the project javascripts are used to evaluate text and me being a javascript noob can't tell if some of those scripts are the problem or it's something else. Have anyone experienced something like this or could have an idea what could be the problem? I've been stuck here for a while so i would try anything. I have also created a simple test project in which i load any page in WKWebView and i don't have that problem. Any idea is welcomed. Thank you!

enter image description here

I have tried everything i could find with no success.

Author:Sad Developer,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74602254/problems-with-text-selection-in-wkwebview-from-ios-15