diff options
Diffstat (limited to 'ui/draggable.js')
-rw-r--r-- | ui/draggable.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ui/draggable.js b/ui/draggable.js index 83ad6487a..2aced90c3 100644 --- a/ui/draggable.js +++ b/ui/draggable.js @@ -141,25 +141,14 @@ $.widget("ui.draggable", $.ui.mouse, { }, _blurActiveElement: function( event ) { - var document = this.document[ 0 ]; // Only need to blur if the event occurred on the draggable itself, see #10527 if ( !this.handleElement.is( event.target ) ) { return; } - // support: IE9 - // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> - try { - - // Support: IE9, IE10 - // If the <body> is blurred, IE will switch windows, see #9520 - if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) { - - // Blur any element that currently has focus, see #4261 - $( document.activeElement ).blur(); - } - } catch ( error ) {} + // Blur any element that currently has focus, see #4261 + $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); }, _mouseStart: function(event) { |