Roo/grid/GridView.js
[roojs1] / roojs-ui-debug.js
index 696a155..338531e 100644 (file)
@@ -32867,6 +32867,7 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
         if(!tpls.master){
             tpls.master = new Roo.Template(
                '<div class="x-grid" hidefocus="true">',
+                  '<a href="#" class="x-grid-focus" tabIndex="-1"></a>',
                   '<div class="x-grid-topbar"></div>',
                   '<div class="x-grid-scroller"><div></div></div>',
                   '<div class="x-grid-locked">',
@@ -32878,7 +32879,7 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
                       '<div class="x-grid-body">{body}</div>',
                   "</div>",
                   '<div class="x-grid-bottombar"></div>',
-                  '<a href="#" class="x-grid-focus" tabIndex="-1"></a>',
+                 
                   '<div class="x-grid-resize-proxy">&#160;</div>',
                "</div>"
             );
@@ -33294,7 +33295,7 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
      */
     ensureVisible : function(row, col, hscroll)
     {
-        Roo.log('GridView.ensureVisible,' + row + ',' + col);
+        //Roo.log('GridView.ensureVisible,' + row + ',' + col);
         //return null; //disable for testing.
         if(typeof row != "number"){
             row = row.rowIndex;
@@ -33324,22 +33325,25 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
         var sleft = parseInt(c.scrollLeft, 10);
         var sbot = stop + ch;
         var sright = sleft + c.clientWidth;
-        
+        /*
         Roo.log('GridView.ensureVisible:' +
-                ' ctop' + ctop +
-                ' c.clientHeight' + c.clientHeight +
-                ' this.mainHd.dom.offsetHeight' + this.mainHd.dom.offsetHeight +
-                ' stop' + stop +
-                ' cbot' + cbot +
-                ' ch' + ch  
+                ' ctop:' + ctop +
+                ' c.clientHeight:' + c.clientHeight +
+                ' this.mainHd.dom.offsetHeight:' + this.mainHd.dom.offsetHeight +
+                ' stop:' + stop +
+                ' cbot:' + cbot +
+                ' sbot:' + sbot +
+                ' ch:' + ch  
                 );
-        
+        */
         if(ctop < stop){
-            c.scrollTop = ctop;
+             c.scrollTop = ctop;
+            //Roo.log("set scrolltop to ctop DISABLE?");
         }else if(cbot > sbot){
+            //Roo.log("set scrolltop to cbot-ch");
             c.scrollTop = cbot-ch;
         }
-
+        
         if(hscroll !== false){
             if(cleft < sleft){
                 c.scrollLeft = cleft;
@@ -33347,6 +33351,7 @@ Roo.extend(Roo.grid.GridView, Roo.grid.AbstractGridView, {
                 c.scrollLeft = cright-c.clientWidth;
             }
         }
+         
         return el;
     },