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" ) ) {
207207// deprecated
208208$ . ui . ie = ! ! / m s i e [ \w . ] + / . exec ( navigator . userAgent . toLowerCase ( ) ) ;
209209
210- $ . support . selectstart = "onselectstart" in document . createElement ( "div" ) ;
211210$ . fn . extend ( {
212211 focus : ( function ( orig ) {
213212 return function ( delay , fn ) {
@@ -225,12 +224,17 @@ $.fn.extend({
225224 } ;
226225 } ) ( $ . fn . focus ) ,
227226
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 ) {
231234 event . preventDefault ( ) ;
232235 } ) ;
233- } ,
236+ } ;
237+ } ) ( ) ,
234238
235239 enableSelection : function ( ) {
236240 return this . unbind ( ".ui-disableSelection" ) ;
You can’t perform that action at this time.
0 commit comments