Roo/bootstrap/Menu.js
authorAlan Knowles <alan@roojs.com>
Fri, 11 Jan 2019 06:48:03 +0000 (14:48 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 11 Jan 2019 06:48:03 +0000 (14:48 +0800)
Roo/bootstrap/Menu.js

index 89f655d..236d546 100644 (file)
@@ -258,12 +258,16 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
      * the element (defaults to this.defaultAlign)
      * @param {Roo.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined)
      */
-    show : function(el, pos, parentMenu){
-        this.parentMenu = parentMenu;
+    show : function(el, pos, parentMenu)
+    {
+        if (true === this.fireEvent("beforeshow", this)) {
+           return;
+       }
+       this.parentMenu = parentMenu;
         if(!this.el){
             this.render();
         }
-        this.fireEvent("beforeshow", this);
+        
         this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign), parentMenu, false);
     },
      /**