PDA

View Full Version : When mouse over first row-Uncaught TypeError: Cannot call method 'removeCls' of null



ELRG
3 Feb 2014, 12:37 PM
When I mouse over the first row of a grid (and only the first row, other rows work fine) I get no mouse over effect, and more importantly, the event/script attached stop working. In debugger Im getting this error:
(ext 4.2.1)

There is nothing special that Im doing with the first row of the grid. Its just like any other row, no events, code attached, configuration, etc etc.


Uncaught TypeError: Cannot call method 'removeCls' of null

debugging using ext-all-dev shows the error at 150637 which is



setHighlightedItem: function(item) {
var me = this,
highlighted = me.highlightedItem;


if (highlighted && me.el.isAncestor(highlighted) && me.isRowStyleFirst(highlighted)) {
me.getRowStyleTableEl(highlighted).removeCls(me.tableOverFirstCls);
}


if (item && me.isRowStyleFirst(item)) {
#Err-> me.getRowStyleTableEl(item).addCls(me.tableOverFirstCls);
}


me.callParent(arguments);
},




which calls getRowStyleTableEl
line 151657

getRowStyleTableEl: function(item /* view item or row index */) {
var me = this;


if (!item.tagName) {
item = this.getNode(item);
}


return (me.isGrouping ? Ext.fly(item) : this.el).down('table.x-grid-table');
},

stepping through it, me.isGrouping is true and item appears to be the right object, so Ext.fly(item).down('table.x-grid-table'); appears to me to be returning null. At this point I am stumped, anyone have any ideas?

I appreciate your help in advance.

scottmartin
6 Feb 2014, 9:36 AM
Place a breakpoint on the line in devTools and check the value of your objects.

ELRG
6 Feb 2014, 1:05 PM
Place a breakpoint on the line in devTools and check the value of your objects.
Can you be more specific? I have placed breakpoints and stepped through lots of code and do not see out of the ordinary. and nothing that I can see that should be causing "Ext.fly(item).down('table.x-grid-table');" to return null.

gkohen
29 Apr 2014, 5:32 AM
Place a breakpoint on the line in devTools and check the value of your objects.

To recreate this issue in Sencha's own example:
1. Go to http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/grouptabs/grouptabs.html
2. Open your devtools to see the console.
3. Hover over the first tab menu item.
4. Error shows up

It seems like it doesn't happen in 4.2.2 examples. It seems like it's time to move to 4.2.2

frank.zammetti
15 Jul 2015, 9:56 AM
Did anyone ever find an answer on this under 4.2.1? I'm running into the same issue now :(