Ext JS 6.2.1: Header and grid cells out of sync in locked grid
In 6.2.1, the grid headers of a locked grid become out of sync with the cells when you scroll down and then click on a cell.
To reproduce the issue, just load up the fiddle below, scroll the grid down a few rows and then click on a cell in the right column (for me, that is "Column 6"). The view then scrolls up again and in the process, the grid headers become out of sync with the content cells.
I see what you are saying in the screenshot but not seeing it happen in my browser. Tried three and not seeing it. Can you give me some more information OS, browser, version?
I can reproduce the issue in any browser... Tried Firefox 51.0.1, Internet Explorer 11 and Chrome 56.0, all running on Windows 7 64-bit.
To be exactly clear: You have to scroll the grid down before clicking a cell in the right column. I noticed that the bug does not happen if you scroll all the way to the right before scrolling down.
Could you please try to reproduce this one more time? I double-checked with some of my colleagues, and they all could reproduce the issue with the fiddle I provided.
Please load up the fiddle, then scroll down a bit using the mousewheel (not all the way down, and don't scroll horizontally), then click on any cell in the column titled "Column 6".
Alright, I took some time to investigate myself. To me it seems you changed the way that TableScroller.scrollIntoView works and forgot to handle the locked grid case. Including this patch fixes the issue for me:
Code:
Ext.define('Patch', {
override: 'Ext.scroll.TableScroller',
scrollIntoView: function (el, hscroll, animate, highlight) {
var lockingScroller = this.getLockingScroller();
if (lockingScroller) {
lockingScroller.scrollIntoView(el, hscroll, animate, highlight);
} else {
this.callParent(arguments);
}
}
});
Of course, this solution is merely based on some advanced guessing from my side and I'm not sure if it has any side effects, so it would be nice if you could acknowledge the issue and fix it as soon as possible.
The header of this thread now states that "a fix was applied for EXTJS-23619 in 6.5.0." and is marked as "[FIXED]". Does that mean you already have a fix? If that is the case, can you help me out with an override so we can update to 6.2.1? Alternatively, if it is included in the 6.2.2 nightlies, maybe I can extract a fix myself from the changes?