Roo/bootstrap/NavItem.js
authoredward <edward@roojs.com>
Fri, 4 Dec 2015 03:14:10 +0000 (11:14 +0800)
committeredward <edward@roojs.com>
Fri, 4 Dec 2015 03:14:10 +0000 (11:14 +0800)
Roo/bootstrap/NavItem.js

index 0501418..660089e 100644 (file)
@@ -272,10 +272,10 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         Roo.log('scroll to element...');
         var c = document.body;
         
-        if(Roo.isFirefox){
-            c = document.documentElement;
-        }
-        
+//        if(Roo.isFirefox){
+//            c = document.documentElement;
+//        }
+//        
         var target = Roo.get(c).select('a[name=' + this.href.split('#')[1] +']', true).first();
         
         if(!target){
@@ -292,7 +292,7 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         this.fireEvent('scrollto', this, options, e);
         Roo.log(Roo.get(c));
         Roo.log(options.value);
-        Roo.get(c).scrollTo('top', options.value, true);
+        Roo.get(document.documentElement).scrollTo('top', options.value, true);
         
         return;
     }