In IE7, the first click on the grid causes ExtJS Ext.grid.GridPanel to go to the top of the page

I have a strange problem with the ExtJS gridPanel array contained in the array, only in IE7, before the rowclick event is fired, when I click on a row, the page scrolls up 2-3 rows. On repeated clicks, the page scrolls until the page is at the top of the page. Then only lines are passed to my handler. I have only two listeners registered in this grid:

 
         listeners: {
             rowclick: function (grid, rowIndex, e) {
              ... my handler
             },
             sortchange: function (grid, rowIndex, e) {}

Do you have any ideas?

+2
javascript events internet-explorer-7 extjs gridpanel
source share
2 answers

I had a similar error in Internet Explorer 7. For me, zoom: 1; position: relative; on the surrounding container helped force the layout property.

+3
source share

Try this patch

Ext.override(Ext.selection.RowModel, { onRowMouseDown: function(view, record, item, index, e) { //IE fix: set focus to the first DIV in selected row Ext.get(item).down('div').focus(); if (!this.allowRightMouseSelection(e)) { return; } this.selectWithEvent(record, e); } }); 

In fact, any "focusable" element can be used (tr and td are not).

+2
source share

All Articles