Last active
April 10, 2025 19:00
-
-
Save netpoetica/a1234ae1d4d2988f03ef to your computer and use it in GitHub Desktop.
iOS Disable User Select but Allow Input (Snippet)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| /* Disable selection/Copy of UIWebView */ | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| -webkit-tap-highlight-color: rgba(0,0,0,0); | |
| } | |
| input,textarea { | |
| /* Exception for input areas */ | |
| -webkit-touch-callout: default !important; | |
| -webkit-user-select: text !important; | |
| } |
How to use or apply to WKWebView?
Don't remember at this point unfortunately. And these days I would never recommend working with WKWebView - so many better alternatives to hybrid apps.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also works in WKWebView. Thanks for the snippet.