Roo/bootstrap/NavItem.js
authoredward <edward@roojs.com>
Fri, 20 Nov 2015 04:08:21 +0000 (12:08 +0800)
committeredward <edward@roojs.com>
Fri, 20 Nov 2015 04:08:21 +0000 (12:08 +0800)
Roo/bootstrap/NavItem.js

index 6681ed0..fc8af2a 100644 (file)
@@ -167,25 +167,23 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
             return;
         }
         
-        if(this.animateRef && this.href.charAt(0) == '#'){
-            this.scrollToElement(e);
-        }
-        
         var p = this.parent();
         
+        // if parent is a navbarheader....- and link is probably a '#' page ref.. then remove the expanded menu.
         if (p.parentType == 'NavHeaderbar' && !this.menu) {
             // remove the collapsed menu expand...
             p.parent().el.select('.navbar-collapse',true).removeClass('in');  
         }
         
+        if(this.animateRef && this.href.charAt(0) == '#'){
+            this.scrollToElement(e);
+        }
+        
         if (['tabs','pills'].indexOf(p.type)!==-1) {
             if (typeof(p.setActiveItem) !== 'undefined') {
                 p.setActiveItem(this);
             }
         }
-        // if parent is a navbarheader....- and link is probably a '#' page ref.. then remove the expanded menu.
-        
-        
     },
     
     isActive: function () {