Question

I am using CSS 3.0 and it is complaining that the "user-select" property doesn't exist. Does anyone know what the appropriate substitute or replacement is?

Was it helpful?

Solution

user-select is back in the specification for CSS Basic User Interface Module Level 4. It is supported by most modern browsers (according to MDN), either prefixed or unprefixed.

#something {
    user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
}

user-select was defined as part of User Interface for CSS3, which was later superseded by CSS3 Basic User Interface Module. However, the latter document does not include specification of user-select. After searching recently, I was unable to find any discussion on why it might have been removed from the spec.

See also: my answer on disabling text selection is not working in IE using jquery.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top