From a9741f9998c46ae1a0d09186001887ef4ed2a86b Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Sat, 9 Feb 2013 20:35:55 -0800 Subject: [PATCH] prevent user from selecting text in choices. fixes #551 --- select2.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/select2.css b/select2.css index 456e049f..4c1452fc 100644 --- a/select2.css +++ b/select2.css @@ -48,6 +48,13 @@ Version: @@ver@@ Timestamp: @@timestamp@@ -moz-background-clip: padding; background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #fff; background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white)); background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%); @@ -330,6 +337,13 @@ Version: @@ver@@ Timestamp: @@timestamp@@ padding: 3px 7px 4px; margin: 0; cursor: pointer; + + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .select2-results .select2-highlighted { @@ -503,6 +517,13 @@ disabled look for disabled choices in the results dropdown -moz-background-clip: padding; background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #e4e4e4; filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0 ); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));