diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-03-09 16:03:22 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-03-12 07:35:27 -0400 |
commit | f33027840cdac5152599da66635981bbe68c6bda (patch) | |
tree | a52f4063e0a2aab02af24d26eee590eba797882e /ui/draggable.js | |
parent | 6111b17710ab4e14bb119e735de9cfa9285badab (diff) | |
download | jquery-ui-f33027840cdac5152599da66635981bbe68c6bda.tar.gz jquery-ui-f33027840cdac5152599da66635981bbe68c6bda.zip |
Core: Add methods to work around IE active element bugs
Closes gh-1478
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) { |