Does anyone know if it’s possible to disable (or make transparent) the native text selection background when on an IOS device using react-native-webview (no problems in chrome or safari). I’ve been throwing everything at this for hours, and nothing is working
So, just to confirm, the usual ::selection styling that works in Chrome and Safari somehow doesn’t work in an app-wrapped webview? That’s odd—I figured the same Webkit library/version would be used there. I don’t have much experience with iOS development. Are deviations between browser and webview a common thing?
I am still new to webview, so not sure of much yet.
I have just noticed something that might be a clue though. I switched out the html string (which contains the CodeMirror editor code in a template literal) with a web address, and the selection behaviour is very different there.
With the website passed in, the selection bg is blue and has two handles – looks more like the native apple selection, none of my styles are effecting it.
With the editor passed into the webview, there are two overlapping selection backgrounds:
A pale red background which I specified in EditorView.theme (there are no handles here for some reason)
A grey background, with only one handle that appears only on heading lines.
I had assumed the monochrome background was the native one. I don’t know where it’s being defined.
Interestingly if I put a background colour on .cm-content it hides the pale red, but the gray background remains visible.
Do you think the grey selection background could be coming from CodeMirror?