diff options
Diffstat (limited to 'ui/widgets/draggable.js')
-rw-r--r-- | ui/widgets/draggable.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ui/widgets/draggable.js b/ui/widgets/draggable.js index 6b862d0d0..9e46c81bb 100644 --- a/ui/widgets/draggable.js +++ b/ui/widgets/draggable.js @@ -103,8 +103,6 @@ $.widget( "ui.draggable", $.ui.mouse, { _mouseCapture: function( event ) { var o = this.options; - this._blurActiveElement( event ); - // Among others, prevent a drag on a resizable-handle if ( this.helper || o.disabled || $( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) { @@ -117,6 +115,8 @@ $.widget( "ui.draggable", $.ui.mouse, { return false; } + this._blurActiveElement( event ); + this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); return true; @@ -147,11 +147,10 @@ $.widget( "ui.draggable", $.ui.mouse, { var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), target = $( event.target ); - // Only blur if the event occurred on an element that is: - // 1) within the draggable handle - // 2) but not within the currently focused element + // Don't blur if the event occurred on an element that is within + // the currently focused element // See #10527, #12472 - if ( this._getHandle( event ) && target.closest( activeElement ).length ) { + if ( target.closest( activeElement ).length ) { return; } |