diff options
Diffstat (limited to 'ui/widgets')
-rw-r--r-- | ui/widgets/draggable.js | 4 | ||||
-rw-r--r-- | ui/widgets/mouse.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/widgets/draggable.js b/ui/widgets/draggable.js index f61c38ce0..b459afe00 100644 --- a/ui/widgets/draggable.js +++ b/ui/widgets/draggable.js @@ -255,7 +255,7 @@ $.widget( "ui.draggable", $.ui.mouse, { if ( !noPropagation ) { var ui = this._uiHash(); if ( this._trigger( "drag", event, ui ) === false ) { - this._mouseUp( {} ); + this._mouseUp( new $.Event( "mouseup", event ) ); return false; } this.position = ui.position; @@ -322,7 +322,7 @@ $.widget( "ui.draggable", $.ui.mouse, { cancel: function() { if ( this.helper.is( ".ui-draggable-dragging" ) ) { - this._mouseUp( {} ); + this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) ); } else { this._clear(); } diff --git a/ui/widgets/mouse.js b/ui/widgets/mouse.js index 938d0f4b7..1d8458b27 100644 --- a/ui/widgets/mouse.js +++ b/ui/widgets/mouse.js @@ -189,7 +189,7 @@ return $.widget( "ui.mouse", { } mouseHandled = false; - return false; + event.preventDefault(); }, _mouseDistanceMet: function( event ) { |