Permalink
Browse files

Core: Removed .disableSelection()

  • Loading branch information...
1 parent 5dcaacc commit c20cef6ae83b13af93fb8c999c0be8d51a5c50fe @scottgonzalez committed Oct 1, 2011
View
1 demos/draggable/delay-start.html
@@ -17,7 +17,6 @@
$(function() {
$( "#draggable" ).draggable({ distance: 20 });
$( "#draggable2" ).draggable({ delay: 1000 });
- $( ".ui-draggable" ).disableSelection();
});
</script>
</head>
View
1 demos/draggable/handle.html
@@ -18,7 +18,6 @@
$(function() {
$( "#draggable" ).draggable({ handle: "p" });
$( "#draggable2" ).draggable({ cancel: "p.ui-widget-header" });
- $( "div, p" ).disableSelection();
});
</script>
</head>
View
1 demos/draggable/sortable.html
@@ -25,7 +25,6 @@
helper: "clone",
revert: "invalid"
});
- $( "ul, li" ).disableSelection();
});
</script>
</head>
View
2 demos/sortable/connect-lists-through-tabs.html
@@ -17,7 +17,7 @@
</style>
<script>
$(function() {
- $( "#sortable1, #sortable2" ).sortable().disableSelection();
+ $( "#sortable1, #sortable2" ).sortable();
var $tabs = $( "#tabs" ).tabs();
View
2 demos/sortable/connect-lists.html
@@ -18,7 +18,7 @@
$(function() {
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable"
- }).disableSelection();
+ });
});
</script>
</head>
View
1 demos/sortable/default.html
@@ -18,7 +18,6 @@
<script>
$(function() {
$( "#sortable" ).sortable();
- $( "#sortable" ).disableSelection();
});
</script>
</head>
View
2 demos/sortable/delay-start.html
@@ -23,8 +23,6 @@
$( "#sortable2" ).sortable({
distance: 15
});
-
- $( "li" ).disableSelection();
});
</script>
</head>
View
1 demos/sortable/display-grid.html
@@ -17,7 +17,6 @@
<script>
$(function() {
$( "#sortable" ).sortable();
- $( "#sortable" ).disableSelection();
});
</script>
</head>
View
2 demos/sortable/empty-lists.html
@@ -24,8 +24,6 @@
connectWith: "ul",
dropOnEmpty: false
});
-
- $( "#sortable1, #sortable2, #sortable3" ).disableSelection();
});
</script>
</head>
View
2 demos/sortable/items.html
@@ -23,8 +23,6 @@
$( "#sortable2" ).sortable({
cancel: ".ui-state-disabled"
});
-
- $( "#sortable1 li, #sortable2 li" ).disableSelection();
});
</script>
</head>
View
1 demos/sortable/placeholder.html
@@ -21,7 +21,6 @@
$( "#sortable" ).sortable({
placeholder: "ui-state-highlight"
});
- $( "#sortable" ).disableSelection();
});
</script>
</head>
View
3 demos/sortable/portlets.html
@@ -22,6 +22,7 @@
<script>
$(function() {
$( ".column" ).sortable({
+ handle: ".portlet-header",
connectWith: ".column"
});
@@ -36,8 +37,6 @@
$( this ).toggleClass( "ui-icon-minusthick" ).toggleClass( "ui-icon-plusthick" );
$( this ).parents( ".portlet:first" ).find( ".portlet-content" ).toggle();
});
-
- $( ".column" ).disableSelection();
});
</script>
</head>
View
4 demos/widget/default.html
@@ -44,9 +44,7 @@
_create: function() {
this.element
// add a class for theming
- .addClass( "custom-colorize" )
- // prevent double click to select text
- .disableSelection();
+ .addClass( "custom-colorize" );
this.changer = $( "<button>", {
text: "change",
View
11 ui/jquery.ui.core.js
@@ -115,17 +115,6 @@ $.fn.extend({
}
return 0;
- },
-
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
}
});
View
2 ui/jquery.ui.dialog.js
@@ -142,7 +142,7 @@ $.widget("ui.dialog", {
.html( title )
.prependTo( uiDialogTitlebar );
- uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
+ uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar );
this._hoverable( uiDialogTitlebarClose );
this._focusable( uiDialogTitlebarClose );
View
7 ui/jquery.ui.resizable.js
@@ -158,8 +158,7 @@ $.widget("ui.resizable", $.ui.mouse, {
//TODO: make renderAxis a prototype function
this._renderAxis(this.element);
- this._handles = $('.ui-resizable-handle', this.element)
- .disableSelection();
+ this._handles = $('.ui-resizable-handle', this.element);
//Matching axis name
this._handles.mouseover(function() {
@@ -489,9 +488,7 @@ $.widget("ui.resizable", $.ui.mouse, {
zIndex: ++o.zIndex //TODO: Don't modify option
});
- this.helper
- .appendTo("body")
- .disableSelection();
+ this.helper.appendTo("body");
} else {
this.helper = this.element;

0 comments on commit c20cef6

Please sign in to comment.