Skip to content

Commit

Permalink
Core: Deprecate .enableSelection() and .disableSelection(). Fixes #77…
Browse files Browse the repository at this point in the history
…55 - Core: Deprecate .disableSelection() and .enableSelection().
  • Loading branch information
scottgonzalez committed Aug 23, 2012
1 parent b9ef00f commit c343598
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions ui/jquery.ui.core.js
Expand Up @@ -125,17 +125,6 @@ $.fn.extend({
$( this ).removeAttr( "id" );
}
});
},

disableSelection: function() {
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
".ui-disableSelection", function( event ) {
event.preventDefault();
});
},

enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
}
});

Expand Down Expand Up @@ -268,6 +257,20 @@ $(function() {


// deprecated

$.fn.extend({
disableSelection: function() {
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
".ui-disableSelection", function( event ) {
event.preventDefault();
});
},

enableSelection: function() {
return this.unbind( ".ui-disableSelection" );
}
});

$.extend( $.ui, {
// $.ui.plugin is deprecated. Use the proxy pattern instead.
plugin: {
Expand Down

0 comments on commit c343598

Please sign in to comment.