PDA

View Full Version : [CLOSED] weird horizontal scrolling effect in a grid with horizontal scrollbar in IE 11



bogc
Nov 07, 2014, 10:15 PM
Hi:

This issue occurs only in IE 11. It doesn't occur in FF (33.0.2) or Chrome (38.0.2125.111 m). To reproduce:

1. Go to this sample: http://examples2.ext.net/#/GridPanel/Locking_Grid/Cell_Editing/ in IE 11.
2. Click on a cell on the last column (Last Updated). It is important that the horizontal scrollbar is on (it should be). What happens is that the grid is scrolled quickly backwards then back to where it was when I clicked on the cell. It gives the impression the grid has a spaz attack when you click on the cell :-)) . Joking aside, it is very annoying. Another way to reproduce it is to move the selection to a cell on the last column then use the UP/DOWN keys to navigate up and down the column. Every time you press the key the grid sort of "shakes" ( it's really changing temporarily the view position).

I really hope that you find a solution to this because it is annoying like hell. This issue did not occur in version Ext.Net 2.2.1.

Thank you!

JakeM
Nov 07, 2014, 10:17 PM
There is a workaround for part of it, but it is still open on the forum.

http://forums.ext.net/showthread.php?23762-OPEN-158-Grid-horizontal-scrollbar-jumps-back-to-beginning-when-selecting-a-record

bogc
Nov 07, 2014, 10:28 PM
@JakeM: Thanks for the extremely prompt response!

This code snippet posted here: http://www.sencha.com/forum/showthread.php?257927&p=990314&viewfull=1#post990314 (it was referenced in the thread you posted (http://forums.ext.net/showthread.php?23762-OPEN-158-Grid-horizontal-scrollbar-jumps-back-to-beginning-when-selecting-a-record) solved it for me.

I am going to see what the fix was by comparing the source code...



/**
* Fix for a bug in ExtJS 4.2.0
* calling row.focus() causes the grid to reset it scroll position in IE
* Remove this when upgrading to EXTJS 4.2.2 if it is not required any more
*/
Ext.override(Ext.view.Table, {
focusRow: function (rowIdx) {
var me = this,
row,
gridCollapsed = me.ownerCt && me.ownerCt.collapsed,
record;
if (me.isVisible(true) && !gridCollapsed && (row = me.getNode(rowIdx, true)) && me.el) {
record = me.getRecord(row);
rowIdx = me.indexInStore(row);

me.selModel.setLastFocused(record);
if (!Ext.isIE) {
row.focus();
}
me.focusedRow = row;
me.fireEvent('rowfocus', record, row, rowIdx);
}
}
});


Thanks again.

bogc
Nov 07, 2014, 10:39 PM
I don't know if it helps but I attached the source code difference (https://dl.dropboxusercontent.com/u/35370420/table_difference.PNG)between version 4.2.1 and 4.2.2. The code doesn't resemble at all with the code snippet posted on the sencha thread. For now, I am going to use that code snippet because it does the trick.

Daniil
Nov 12, 2014, 12:07 PM
Hi @bogc,

You might be interested in this post.
http://forums.ext.net/showthread.php?23762&p=210851&viewfull=1#post210851

bogc
Nov 12, 2014, 6:07 PM
Thanks, Daniil. Just curious, this issue doesn't occur in Ext.Net 3.0, does it?

Daniil
Nov 12, 2014, 8:35 PM
Yes, I could not reproduce it with Ext.NET v3.0.