diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-05-13 21:57:47 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-05-20 14:27:56 -0400 |
commit | ce949812b671d26f82e21f1856d73fde2f43f2dd (patch) | |
tree | e6eb8016977bccc01cc05d4120cba9e4b15c682a | |
parent | be0a176b1f399e856654b2e71a1a9df28501a646 (diff) | |
download | jquery-ui-ce949812b671d26f82e21f1856d73fde2f43f2dd.tar.gz jquery-ui-ce949812b671d26f82e21f1856d73fde2f43f2dd.zip |
Draggable: Remove core event/alias and deprecated module dependencies
-rw-r--r-- | tests/unit/draggable/core.js | 2 | ||||
-rw-r--r-- | tests/unit/draggable/helper.js | 8 | ||||
-rw-r--r-- | tests/visual/draggable/replaced.html | 2 | ||||
-rw-r--r-- | ui/draggable.js | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit/draggable/core.js b/tests/unit/draggable/core.js index 6e12b3521..802ed2928 100644 --- a/tests/unit/draggable/core.js +++ b/tests/unit/draggable/core.js @@ -116,7 +116,7 @@ test( "Stray mousemove after mousedown still drags", function() { // In IE8, when content is placed under the mouse (e.g. when draggable content is replaced // on mousedown), mousemove is triggered on those elements even though the mouse hasn't moved. // Support: IE <9 - element.bind( "mousedown", function() { + element.on( "mousedown", function() { $( document ).simulate( "mousemove", { button: -1 }); }); diff --git a/tests/unit/draggable/helper.js b/tests/unit/draggable/helper.js index 1858e187b..4af87d37f 100644 --- a/tests/unit/draggable/helper.js +++ b/tests/unit/draggable/helper.js @@ -84,7 +84,7 @@ return $.extend( helper, { element = $( el ), beginOffset = element.offset(); - element.bind( "dragstop", function() { + element.on( "dragstop", function() { ok( false, "should not drag " + msg ); }); @@ -100,7 +100,7 @@ return $.extend( helper, { equal( newOffset.left, beginOffset.left, "Offset left should not be different" ); equal( newOffset.top, beginOffset.top, "Offset top should not be different" ); - element.unbind( "dragstop" ); + element.off( "dragstop" ); }, setScrollable: function( what, isScrollable ) { @@ -139,7 +139,7 @@ return $.extend( helper, { }, trackMouseCss: function( el ) { - el.bind( "drag", function() { + el.on( "drag", function() { el.data( "last_dragged_cursor", $( "body" ).css( "cursor" ) ); }); }, @@ -149,7 +149,7 @@ return $.extend( helper, { el.draggable( "option", "helper", "clone" ); // Get what parent is at time of drag - el.bind( "drag", function(e, ui) { + el.on( "drag", function(e, ui) { el.data( "last_dragged_parent", ui.helper.parent()[ 0 ] ); }); } diff --git a/tests/visual/draggable/replaced.html b/tests/visual/draggable/replaced.html index 9b5471694..f343eea28 100644 --- a/tests/visual/draggable/replaced.html +++ b/tests/visual/draggable/replaced.html @@ -13,7 +13,7 @@ $(function() { $( "#draggable" ) .draggable() - .bind( "mousedown", function() { + .on( "mousedown", function() { $( this ).html( "<div>replaced</div>" ); }); }); diff --git a/ui/draggable.js b/ui/draggable.js index d938be1e8..a3cd5ba7d 100644 --- a/ui/draggable.js +++ b/ui/draggable.js @@ -309,7 +309,7 @@ $.widget("ui.draggable", $.ui.mouse, { // Only need to focus if the event occurred on the draggable itself, see #10527 if ( this.handleElement.is( event.target ) ) { // The interaction is over; whether or not the click resulted in a drag, focus the element - this.element.focus(); + this.element.trigger( "focus" ); } return $.ui.mouse.prototype._mouseUp.call(this, event); |