function onHide(m){
active.remove(m);
if(active.length < 1){
- Roo.get(document).un("mousedown", onMouseDown);
+ Roo.get(document).un("mouseup", onMouseDown);
attached = false;
}
lastShow = new Date();
active.add(m);
if(!attached){
- Roo.get(document).on("mousedown", onMouseDown);
+ Roo.get(document).on("mouseup", onMouseDown);
attached = true;
}
}
}
- // private
+ // private this should really trigger on mouseup..
function onMouseDown(e){
- Roo.log("on MouseDown");
- if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){
- hideAll();
+ Roo.log("on Mouse Up");
+
+ if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".dropdown-menu") && !e.getTarget('.user-menu')){
+ Roo.log("MenuManager hideAll");
+ hideAll();
+ e.stopEvent();
}
+
+
}
// private