Skip to content

Instantly share code, notes, and snippets.

@netpoetica
Last active April 10, 2025 19:00
Show Gist options
  • Select an option

  • Save netpoetica/a1234ae1d4d2988f03ef to your computer and use it in GitHub Desktop.

Select an option

Save netpoetica/a1234ae1d4d2988f03ef to your computer and use it in GitHub Desktop.

Revisions

  1. Keith Rosenberg revised this gist May 28, 2014. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions ios-select-fix.css
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,12 @@
    /*
    This is for demonstration purposes. Ideally, you should never use the star selector.
    I recommend that you use this early on in your development, and then once you've established
    your HTML element palette, go back and replace * with a comma-separated list of your
    tag names. Additionally, the !important shouldn't have to be used, but I'm leaving it here
    because some enterprising goons will probably copy and paste this directly into their project -
    the !important will ensure these settings override other attempts that were either never
    deleted or are part of an installed CSS file the user is unaware of.
    */
    * {
    /* Disable selection/Copy of UIWebView */
    -webkit-touch-callout: none;
  2. Keith Rosenberg created this gist May 28, 2014.
    12 changes: 12 additions & 0 deletions ios-select-fix.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    * {
    /* 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;
    }