File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,6 @@ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
207
207
// deprecated
208
208
$ . ui . ie = ! ! / m s i e [ \w . ] + / . exec ( navigator . userAgent . toLowerCase ( ) ) ;
209
209
210
- $ . support . selectstart = "onselectstart" in document . createElement ( "div" ) ;
211
210
$ . fn . extend ( {
212
211
focus : ( function ( orig ) {
213
212
return function ( delay , fn ) {
@@ -225,12 +224,17 @@ $.fn.extend({
225
224
} ;
226
225
} ) ( $ . fn . focus ) ,
227
226
228
- disableSelection : function ( ) {
229
- return this . bind ( ( $ . support . selectstart ? "selectstart" : "mousedown" ) +
230
- ".ui-disableSelection" , function ( event ) {
227
+ disableSelection : ( function ( ) {
228
+ var eventType = "onselectstart" in document . createElement ( "div" ) ?
229
+ "selectstart" :
230
+ "mousedown" ;
231
+
232
+ return function ( ) {
233
+ return this . bind ( eventType + ".ui-disableSelection" , function ( event ) {
231
234
event . preventDefault ( ) ;
232
235
} ) ;
233
- } ,
236
+ } ;
237
+ } ) ( ) ,
234
238
235
239
enableSelection : function ( ) {
236
240
return this . unbind ( ".ui-disableSelection" ) ;
You can’t perform that action at this time.
0 commit comments