diff options
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index bf90d349b..ab1e800cd 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -78,6 +78,8 @@ $.widget("ui.draggable", $.ui.mouse, { var o = this.options; + $( document.activeElement ).blur(); + // among others, prevent a drag on a resizable-handle if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { return false; @@ -263,6 +265,9 @@ $.widget("ui.draggable", $.ui.mouse, { $.ui.ddmanager.dragStop(this, event); } + // The interaction is over; whether or not the click resulted in a drag, focus the element + this.element.focus(); + return $.ui.mouse.prototype._mouseUp.call(this, event); }, |