mozilla
Your Search Results

    -moz-user-select Redirect 1

    Non-standard
    This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

    Note: Check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers.

    Controls the actual Selection operation. This doesn't have any effect on content loaded as chrome, except in textboxes. A similar property 'user-focus' was proposed in early drafts of a predecessor of css3-ui but was rejected by the working group.

    Formal syntax: none | text | all | element
    (-prefix-)user-select: none;
    (-prefix-)user-select: text;
    (-prefix-)user-select: all;
    (-prefix-)user-select: element;
    none
    The text of the element and sub-elements will not be able to be selected. Selection can contain these elements. Starting with Firefox 21 none behaves like -moz-none, so selection can be re-enabled on sub-elements using -moz-user-select:text.
    text
    The text can be selected by the user.
    -moz-none Non-standard
    The text of the element and sub-elements will appear as if they cannot be selected. Selection can contain these elements. Selection can be re-enabled on sub-elements using -moz-user-select:text. Starting with Firefox 21 none behaves like -moz-none.
    all
    In an HTML editor, if a double-click or context-click occurred in sub-elements, the highest ancestor with this value will be selected.
    element
    Supported only in Internet Explorer. Enables selection to start within the element; however, the selection will be contained by the bounds of that element.
    Note: user-select is not currently part of any W3C CSS specification. As such, there are minor differences between the browser implementations. Be sure to test your application across browsers.

    Examples

    .unselectable {
      -moz-user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
    }
    
    <body>
      <p class="unselectable">The user is not able to select this text in Firefox, Chrome, Safari and IE.</p>
    
    </body>
    

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
    Basic support 1-webkit (Yes)-moz 10-ms - (Yes)-webkit
    element Not supported (Yes) (Yes)   Not supported
    Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    Basic support ? ? ? ? ?

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy
    Last updated by: Sheppy,
    Hide Sidebar