diff options
-rw-r--r-- | demos/popup/animation.html | 12 | ||||
-rw-r--r-- | demos/popup/default.html | 12 | ||||
-rw-r--r-- | ui/jquery.ui.popup.js | 7 |
3 files changed, 4 insertions, 27 deletions
diff --git a/demos/popup/animation.html b/demos/popup/animation.html index 3d5f50583..d14a12cd7 100644 --- a/demos/popup/animation.html +++ b/demos/popup/animation.html @@ -9,7 +9,6 @@ <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.position.js"></script> <script src="../../ui/jquery.ui.button.js"></script> - <script src="../../ui/jquery.ui.menu.js"></script> <script src="../../ui/jquery.effects.core.js"></script> <script src="../../ui/jquery.effects.blind.js"></script> <script src="../../ui/jquery.effects.scale.js"></script> @@ -43,17 +42,6 @@ </script> <style type="text/css"> .ui-popup { position: absolute; z-index: 5000; } - .ui-menu { width: 200px; } - - /* - table { - border-collapse: collapse; - } - th, td { - padding: 0.5em; - border: 1px solid black; - } - */ #login-form { width: 16em; border: 1px solid gray; border-radius: 5px; diff --git a/demos/popup/default.html b/demos/popup/default.html index 97fc01fb2..26c4d19a0 100644 --- a/demos/popup/default.html +++ b/demos/popup/default.html @@ -9,7 +9,6 @@ <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.position.js"></script> <script src="../../ui/jquery.ui.button.js"></script> - <script src="../../ui/jquery.ui.menu.js"></script> <script src="../../ui/jquery.ui.popup.js"></script> <script> $(function() { @@ -28,17 +27,6 @@ </script> <style type="text/css"> .ui-popup { position: absolute; z-index: 5000; } - .ui-menu { width: 200px; } - - /* - table { - border-collapse: collapse; - } - th, td { - padding: 0.5em; - border: 1px solid black; - } - */ #login-form { width: 16em; border: 1px solid gray; border-radius: 5px; diff --git a/ui/jquery.ui.popup.js b/ui/jquery.ui.popup.js index 4ef1e2c29..ce7a565db 100644 --- a/ui/jquery.ui.popup.js +++ b/ui/jquery.ui.popup.js @@ -88,8 +88,8 @@ $.widget( "ui.popup", { } }); - if ( !this.element.is( ":ui-menu" ) ) { - //default use case, wrap tab order in popup + if ( !$.ui.menu || !this.element.is( ":ui-menu" ) ) { + // default use case, wrap tab order in popup this._bind({ keydown : function( event ) { if ( event.keyCode !== $.ui.keyCode.TAB ) { return; @@ -174,7 +174,8 @@ $.widget( "ui.popup", { .attr( "aria-expanded", "true" ) .position( position ); - if (this.element.is( ":ui-menu" )) { //popup is a menu + // can't use custom selector when menu isn't loaded + if ( $.ui.menu && this.element.is( ":ui-menu" ) ) { this.element.menu( "focus", event, this.element.children( "li" ).first() ); this.element.focus(); } else { |