aboutsummaryrefslogtreecommitdiffstats
path: root/ui/menu.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-03-09 16:03:22 -0400
committerScott González <scott.gonzalez@gmail.com>2015-03-12 07:35:27 -0400
commitf33027840cdac5152599da66635981bbe68c6bda (patch)
treea52f4063e0a2aab02af24d26eee590eba797882e /ui/menu.js
parent6111b17710ab4e14bb119e735de9cfa9285badab (diff)
downloadjquery-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/menu.js')
-rw-r--r--ui/menu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/menu.js b/ui/menu.js
index 6c09e336f..091c89542 100644
--- a/ui/menu.js
+++ b/ui/menu.js
@@ -95,7 +95,7 @@ return $.widget( "ui.menu", {
// Open submenu on click
if ( target.has( ".ui-menu" ).length ) {
this.expand( event );
- } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
+ } else if ( !this.element.is( ":focus" ) && $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( ".ui-menu" ).length ) {
// Redirect focus to the menu
this.element.trigger( "focus", [ true ] );
@@ -135,7 +135,7 @@ return $.widget( "ui.menu", {
},
blur: function( event ) {
this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
+ if ( !$.contains( this.element[0], $.ui.safeActiveElement( this.document[0] ) ) ) {
this.collapseAll( event );
}
});