PDA

View Full Version : [CLOSED] [4.0.6] Grid Editing throws exception in Firebug: "_root is null"



anb
28 Sep 2011, 4:25 AM
Not sure if this is an Ext or Firebug bug, but it's annoying when developing with FF/Firebug.


REQUIRED INFORMATION




Ext version tested:

Ext 4.0.6
Browser versions tested against:

FF 6.0.2 (firebug 1.8.3 installed)
IE 9 (no bug)
Chrome 14 (no bug)
Description:

When editing a record of a store which is bound to a grid panel, firebug throws a "_root is null" exception, but the record is modified and the grid gets updated as expected.
Steps to reproduce the problem:

Enable firebug and enable break on all errors at console tab.
Open http://docs.sencha.com/ext-js/4-0/#!/example/grid/cell-editing.html
You can also reproduce the exception with the provided code below.
Test Case:




Ext.onReady(function () {


var grid,
store,
model;

Ext.define('MyModel', {
extend : 'Ext.data.Model',
fields:['name', 'email', 'phone']
});

store = Ext.create('Ext.data.Store', {
model : 'MyModel',
storeId : 'MyStore',
data : {
"items" : [
{
'name' : 'Lisa',
"email" : "lisa@simpsons.com",
"phone" : "555-111-1224"
},
{
'name' : 'Bart',
"email" : "bart@simpsons.com",
"phone" : "555-222-1234"
},
{
'name' : 'Homer',
"email" : "home@simpsons.com",
"phone" : "555-222-1244"
},
{
'name' : 'Marge',
"email" : "marge@simpsons.com",
"phone" : "555-222-1254"
}
]
},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});

grid = Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: store,
columns: [
{ header: 'Name', dataIndex: 'name' },
{ header: 'Email', dataIndex: 'email', flex: 1 },
{ header: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});

store.load(function () {
store.getAt(0).set('name', 'Lisa Changed');
});
});





HELPFUL INFORMATION




See this URL for live test case: http://docs.sencha.com/ext-js/4-0/#!/example/grid/cell-editing.html




Debugging already done:

none
Possible fix:

not provided
Operating System:

Win 7 Business

evant
28 Sep 2011, 4:27 AM
See: http://www.sencha.com/forum/showthread.php?146622-EXT-JS-4-and-Firebug-Issue-(template-evaluation)

It's in a try catch block, if FF is set to break on all errors, it will break there.

Closing off.