allow string based values for comboboxarray
[roojs1] / Roo / bootstrap / MenuMgr.js
index 08840b0..09970bc 100644 (file)
@@ -42,7 +42,7 @@ Roo.bootstrap.MenuMgr = function(){
    function onHide(m){
        active.remove(m);
        if(active.length < 1){
-           Roo.get(document).un("mousedown", onMouseDown);
+           Roo.get(document).un("mouseup", onMouseDown);
             
            attached = false;
        }
@@ -54,7 +54,7 @@ Roo.bootstrap.MenuMgr = function(){
        lastShow = new Date();
        active.add(m);
        if(!attached){
-           Roo.get(document).on("mousedown", onMouseDown);
+          Roo.get(document).on("mouseup", onMouseDown);
            
            attached = true;
        }
@@ -87,12 +87,17 @@ Roo.bootstrap.MenuMgr = function(){
        }
    }
 
-   // 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