Skip to content

Commit c343598

Browse files
committed
Core: Deprecate .enableSelection() and .disableSelection(). Fixes #7755 - Core: Deprecate .disableSelection() and .enableSelection().
1 parent b9ef00f commit c343598

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

ui/jquery.ui.core.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,6 @@ $.fn.extend({
125125
$( this ).removeAttr( "id" );
126126
}
127127
});
128-
},
129-
130-
disableSelection: function() {
131-
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
132-
".ui-disableSelection", function( event ) {
133-
event.preventDefault();
134-
});
135-
},
136-
137-
enableSelection: function() {
138-
return this.unbind( ".ui-disableSelection" );
139128
}
140129
});
141130

@@ -268,6 +257,20 @@ $(function() {
268257

269258

270259
// deprecated
260+
261+
$.fn.extend({
262+
disableSelection: function() {
263+
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
264+
".ui-disableSelection", function( event ) {
265+
event.preventDefault();
266+
});
267+
},
268+
269+
enableSelection: function() {
270+
return this.unbind( ".ui-disableSelection" );
271+
}
272+
});
273+
271274
$.extend( $.ui, {
272275
// $.ui.plugin is deprecated. Use the proxy pattern instead.
273276
plugin: {

0 commit comments

Comments
 (0)