Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion demos/draggable/delay-start.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
$(function() {
$( "#draggable" ).draggable({ distance: 20 });
$( "#draggable2" ).draggable({ delay: 1000 });
$( ".ui-draggable" ).disableSelection();
});
</script>
</head>
Expand Down
1 change: 0 additions & 1 deletion demos/draggable/handle.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
$(function() {
$( "#draggable" ).draggable({ handle: "p" });
$( "#draggable2" ).draggable({ cancel: "p.ui-widget-header" });
$( "div, p" ).disableSelection();
});
</script>
</head>
Expand Down
1 change: 0 additions & 1 deletion demos/draggable/sortable.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
helper: "clone",
revert: "invalid"
});
$( "ul, li" ).disableSelection();
});
</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion demos/sortable/connect-lists-through-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</style>
<script>
$(function() {
$( "#sortable1, #sortable2" ).sortable().disableSelection();
$( "#sortable1, #sortable2" ).sortable();

var $tabs = $( "#tabs" ).tabs();

Expand Down
2 changes: 1 addition & 1 deletion demos/sortable/connect-lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$(function() {
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable"
}).disableSelection();
});
});
</script>
</head>
Expand Down
1 change: 0 additions & 1 deletion demos/sortable/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<script>
$(function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
</script>
</head>
Expand Down
2 changes: 0 additions & 2 deletions demos/sortable/delay-start.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
$( "#sortable2" ).sortable({
distance: 15
});

$( "li" ).disableSelection();
});
</script>
</head>
Expand Down
1 change: 0 additions & 1 deletion demos/sortable/display-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<script>
$(function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
</script>
</head>
Expand Down
2 changes: 0 additions & 2 deletions demos/sortable/empty-lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
connectWith: "ul",
dropOnEmpty: false
});

$( "#sortable1, #sortable2, #sortable3" ).disableSelection();
});
</script>
</head>
Expand Down
2 changes: 0 additions & 2 deletions demos/sortable/items.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
$( "#sortable2" ).sortable({
cancel: ".ui-state-disabled"
});

$( "#sortable1 li, #sortable2 li" ).disableSelection();
});
</script>
</head>
Expand Down
1 change: 0 additions & 1 deletion demos/sortable/placeholder.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
$( "#sortable" ).sortable({
placeholder: "ui-state-highlight"
});
$( "#sortable" ).disableSelection();
});
</script>
</head>
Expand Down
3 changes: 1 addition & 2 deletions demos/sortable/portlets.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<script>
$(function() {
$( ".column" ).sortable({
handle: ".portlet-header",
connectWith: ".column"
});

Expand All @@ -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>
Expand Down
4 changes: 1 addition & 3 deletions demos/widget/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 0 additions & 11 deletions ui/jquery.ui.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
}
});

Expand Down
2 changes: 1 addition & 1 deletion ui/jquery.ui.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ $.widget("ui.dialog", {
.html( title )
.prependTo( uiDialogTitlebar );

uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar );
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole line should've been deleted.

this._hoverable( uiDialogTitlebarClose );
this._focusable( uiDialogTitlebarClose );

Expand Down
7 changes: 2 additions & 5 deletions ui/jquery.ui.resizable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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;
Expand Down