PDA

View Full Version : [3.??] Rowclick event in Internet Explorer



Groofy
26 Jun 2009, 2:11 AM
Hi all,

I've just began upgrading my code for extjs 3.0. I have a grid (of clients) in which on a rowclick the client must be loaded in. In FireFox 3.0 and Chrome 2.0 there is no problem and all works as expected. However my client still uses Internet Explorer 6.0 (I know!!). If you keep clicking on a row, eventually it will trigger the event. (after 5 to 10 times of clicking :) )

Following code is used:


var grid = new Ext.grid.GridPanel({
id:'clienstGrid',
loadMask:true,
autoRender:'chooseClient',
store:Ext.StoreMgr.lookup('clients'),
sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
listeners: {
'rowclick': {
fn:function(grid, rowIndex, e){
var rec = grid.store.getAt(rowIndex);
loadClientData(rec.get('id'),rec.get('name'));
}
,scope:this
}
},
tbar:[],
plugins:[new Ext.ux.grid.Search({
iconCls:'icon-zoom'
,readonlyIndexes:['note']
,disableIndexes:['pctChange']
,minChars:3
,minLength:3
,autoFocus:true
,position:'top'
,mode:'remote'
,width:250
,searchText:eBook.Language.Client.SearchClient
,searchTipText:eBook.Language.Client.SearchClientMessage
,selectAllText:eBook.Language.Common.SelectAllFields
})],
columns:[new Ext.grid.RowNumberer()
,{header: eBook.Language.Client.GfisClientNumber, width: 120, dataIndex: 'gfis', sortable: true}
,{header: eBook.Language.Common.LastName, width: 120, dataIndex: 'name', sortable: true}
,{header: eBook.Language.Common.Address, width: 120, dataIndex: 'address', sortable: true}
,{header: eBook.Language.Common.ZipCode, width: 120, dataIndex: 'zipcode', sortable: true}
,{header: eBook.Language.Common.City, width: 120, dataIndex: 'city', sortable: true}
,{header: eBook.Language.Common.Country, width: 120, dataIndex: 'country', sortable: true}]
,height:300
});

Any help would be greatly appreciated.

Cheers,
...Tim

evant
26 Jun 2009, 2:34 AM
Definitely can't reproduce this. Moving to help.

Groofy
26 Jun 2009, 3:42 AM
Hi Evan,

In order to find the issue i've placed console log's into the fireevent function of EXTUTIL.Observable. When I click once on a row, following events are triggered (fireEvent, in order):
FireFox:
mousedown, rowmousedown, beforerowselect, clear, add, rowselect, selectionchange, cellmousedown, mousedown, mouseup, enable, click, rowclick -end relevant-

Internet Explorer 6.0:
mousedown, rowmousedown, beforerowselect, clear, add, rowselect, selectionchange, cellmousedown, mousedown, mouseup, enable -end relevant-

When I add an alert to the fireEvent in case of eventname "mouseup", and therefore creating a moment of tranquility, the click and rowclick events get fired.
Perhaps this problem has something to do with timing/performance of IE 6.O itself?

If I go back to ExtJS 2.2, the problem doesn't occur.

Hope this helps you a bit further.

Cheers,
...Tim

Groofy
26 Jun 2009, 3:48 AM
Just to let you know this ain't urgent at all for me. Since the rowmousedown gets triggered, I can use that event for now.

Cheers,
...Tim

evant
26 Jun 2009, 5:58 AM
I tested this with IE6 and the rowclick event fires as I would expect. I'm using the latest SVN version though it shouldn't really have any impact.

Groofy
26 Jun 2009, 6:23 AM
Strange... Might just be on my pc or in combination of the layout then. You never know with IE :)

Anyways, thanks for checking it out. If I do come across the origin of this problem I'll let you know.

Cheers,
...Tim