-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-menu.Manager'>/**
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-menu-Manager'>/**
</span> * @class Ext.menu.Manager
* Provides a common registry of all menus on a page.
* @singleton
}, me);
},
-<span id='Ext-menu.Manager-method-hideAll'> /**
+<span id='Ext-menu-Manager-method-hideAll'> /**
</span> * Hides all menus that are currently visible
* @return {Boolean} success True if any active menus were hidden.
*/
onMouseDown: function(e) {
var me = this,
active = me.active,
- lastShow = me.lastShow;
+ lastShow = me.lastShow,
+ target = e.target;
if (Ext.Date.getElapsed(lastShow) > 50 && active.length > 0 && !e.getTarget('.' + Ext.baseCSSPrefix + 'menu')) {
me.hideAll();
+ // in IE, if we mousedown on a focusable element, the focus gets cancelled and the focus event is never
+ // fired on the element, so we'll focus it here
+ if (Ext.isIE && Ext.fly(target).focusable()) {
+ target.focus();
+ }
}
},
}
},
-<span id='Ext-menu.Manager-method-get'> /**
+<span id='Ext-menu-Manager-method-get'> /**
</span> * Returns a {@link Ext.menu.Menu} object
* @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will
* be used to generate and return a new Menu this.
}
}
}
-});</pre></pre></body></html>
\ No newline at end of file
+});</pre>
+</body>
+</html>