Recently used a lot of open source things, found that open source things are also bugs such as clouds, this is not, and encountered the ExtJs2.2 in the grid bug.
BUG1: After the vertical scroll bar appears, drag the horizontal scroll bar to the end, and then find that each record in the grid will move to the left and a blank space on the right.
BUG2: After the horizontal scroll bar, pull the scroll bar to the right, and then click on any line, you will find that the row content to the left offset, the scroll bar to the right more, the more obvious the offset.
================
Analysis: After ex.t2.3 has no such bug, tracking two code after the summary below (I have been tracking for a long time)
BUG1: Modifying gridview.js files
Private Updateallcolumnwidths:function () {var tw = this.gettotalwidth ();
var Clen = This.cm.getColumnCount ();
var ws = [];
for (var i = 0; i < Clen i++) {Ws[i] = this.getcolumnwidth (i);
} this.innerHd.firstChild.style.width = This.getoffsetwidth ();
This.innerHd.firstChild.firstChild.style.width = TW;
This.mainBody.dom.style.width = TW;
for (var i = 0; i < Clen i++) {var HD = This.getheadercell (i);
Hd.style.width = Ws[i];
var ns = This.getrows (), row, Trow;
for (var i = 0, len = ns.length i < len; i++) {row = Ns[i];
Row.style.width = TW;
if (row.firstchild) {row.firstChild.style.width = TW;
Trow = Row.firstchild.rows[0];
for (var j = 0; J < Clen; J + +) {trow.childnodes[j].style.width = Ws[j];
}
}
} this.onallcolumnwidthsupdated (WS, TW);
},//Private Updatecolumnwidth:function (col, width) {var w = this.getcolumnwidth (col);
var tw = This.gettotalwidth ();
This.innerHd.firstChild.style.width = This.getoffsetwidth ();
This.innerHd.firstChild.firstChild.style.width = TW;
This.mainBody.dom.style.width = TW;
var HD = This.getheadercell (col);
Hd.style.width = W;
var ns = This.getrows (), row;
for (var i = 0, len = ns.length i < len; i++) {row = Ns[i];
Row.style.width = TW;
if (row.firstchild) {row.firstChild.style.width = TW;
Row.firstchild.rows[0].childnodes[col].style.width = W;
} this.oncolumnwidthupdated (col, W, TW);
},//Private updatecolumnhidden:function (col, hidden) {var tw = this.gettotalwidth (); This.innerHd.firstChild.style.width = This.getoffsetwidth ();
This.innerHd.firstChild.firstChild.style.width = TW;
This.mainBody.dom.style.width = TW; var display = hidden?
' None ': ';
var HD = This.getheadercell (col);
Hd.style.display = display;
var ns = This.getrows (), row;
for (var i = 0, len = ns.length i < len; i++) {row = Ns[i];
Row.style.width = TW;
if (row.firstchild) {row.firstChild.style.width = TW;
Row.firstchild.rows[0].childnodes[col].style.display = display;
} this.oncolumnhiddenupdated (col, Hidden, TW); Delete this.lastviewwidth;
Force Recalc This.layout (); },
Bug2. Shift to the left, heck, I don't know what Extjs2.2 was doing at the time.
/**
* focuses the specified cell.
* @param {Number} row the row index
* @param {number} col the column index
/focuscell:function (row, col, h Scroll) {
This function is written in a problematic notation. Even the grid below the coordinates of the wrong, the specific way I was picked from the Ext2.3.
But this is not allowed to attach attachments. Everyone go here to download http://download.csdn.net/detail/xzknet/4408844.